From: Ummon Date: Thu, 7 Dec 2017 09:32:43 +0000 (+0100) Subject: More compact... X-Git-Url: https://git.euphorik.ch/?a=commitdiff_plain;h=582a59e2b6984b1ecf90b83440d57d48633a6066;p=advent_of_code_2017.git More compact... --- diff --git a/AdventOfCode2017/Day7.fs b/AdventOfCode2017/Day7.fs index 827fee1..2fe6ae0 100644 --- a/AdventOfCode2017/Day7.fs +++ b/AdventOfCode2017/Day7.fs @@ -18,12 +18,7 @@ let parseInput (lines : string list) : Input = |> List.map ( fun line -> let items = line.Split ([| '\r'; '\t'; ' '; ','; ')'; '(' |], StringSplitOptions.RemoveEmptyEntries) - { - Name = items.[0] - Weight = int items.[1] - Above = List () - }, - [ for i in 3 .. items.Length - 1 -> items.[i] ] + { Name = items.[0]; Weight = int items.[1]; Above = List () }, [ for i in 3 .. items.Length - 1 -> items.[i] ] ) let buildTower (input : Input) : Tower =