From 2c67c4934636548cd231ef439e92ab790f4dfcdc Mon Sep 17 00:00:00 2001 From: Andrew Glaze Date: Thu, 4 Dec 2025 21:58:35 -0500 Subject: [PATCH] code change for embedded --- day01/Sources/day01/day01.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/day01/Sources/day01/day01.swift b/day01/Sources/day01/day01.swift index d95cde8..31e03f1 100644 --- a/day01/Sources/day01/day01.swift +++ b/day01/Sources/day01/day01.swift @@ -4,12 +4,13 @@ @main struct day01 { static func parseInput(_ input: String) -> [(Direction, Int)] { - return input.split(whereSeparator: \.isNewline) + return input.split(whereSeparator: {char in char.isNewline}) .map({ line in return (Direction(line.first!), Int(line.dropFirst())!) }) } + static func part1(_ input: [(Direction, Int)]) { var cur = 50 var count = 0