From aeae7c191667a05b483d2058f4e2f0f720d799a9 Mon Sep 17 00:00:00 2001 From: Ummon Date: Tue, 5 Dec 2017 08:44:17 +0100 Subject: [PATCH] Do not parse input twice --- AdventOfCode2017/Program.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AdventOfCode2017/Program.fs b/AdventOfCode2017/Program.fs index db1ca80..574d6d9 100644 --- a/AdventOfCode2017/Program.fs +++ b/AdventOfCode2017/Program.fs @@ -20,8 +20,8 @@ let day4 () = sprintf "part1 = %A, part2 = %A" (Day4.nbPassphrasesValid Day4.passphraseValid input) (Day4.nbPassphrasesValid Day4.passphraseValidAnagram input) let day5 () = - let input = File.ReadAllText "Data/day5.input" - sprintf "part1 = %A, part2 = %A" (Day5.nbSteps1 (Day5.parseInput input)) (Day5.nbSteps2 (Day5.parseInput input)) + let input = File.ReadAllText "Data/day5.input" |> Day5.parseInput + sprintf "part1 = %A, part2 = %A" (Day5.nbSteps1 input) (Day5.nbSteps2 input) let doDay (n : int) = let result = -- 2.45.2