// // main.swift // AoC1 // // Created by Marijn Doeve on 01-12-2021. // import Foundation var depths = [Int]() let fileContent = try! String(contentsOfFile: CommandLine.arguments[1]) for line in fileContent.components(separatedBy: .newlines) { if let line = Int(line) { depths.append(line) } } var total = 0 for i in 1.. prev { total += 1 } prev = new } print("b:", total)