From dea62d69c22439e006d99cbe48554736b4277fa7 Mon Sep 17 00:00:00 2001 From: Greg Burri Date: Sun, 2 Dec 2018 21:53:46 +0100 Subject: [PATCH] Day 2 skeleton --- AdventOfCode2018.fsproj | 11 ++++------- Day01.fs | 1 - Day02.fs | 10 ++++++++++ Program.fs | 5 +++++ 4 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 Day02.fs diff --git a/AdventOfCode2018.fsproj b/AdventOfCode2018.fsproj index 5bfcb35..81a24c8 100644 --- a/AdventOfCode2018.fsproj +++ b/AdventOfCode2018.fsproj @@ -1,17 +1,14 @@ - - + Exe netcoreapp2.1 - + - - + PreserveNewest - - + \ No newline at end of file diff --git a/Day01.fs b/Day01.fs index 5659b61..449fde1 100644 --- a/Day01.fs +++ b/Day01.fs @@ -2,7 +2,6 @@ module AdventOfCode2018.Day01 open System - let parseInput (str : string) : int[] = str.Split ([| "\r\n"; "\r"; "\n" |], StringSplitOptions.RemoveEmptyEntries) |> Array.map int diff --git a/Day02.fs b/Day02.fs new file mode 100644 index 0000000..af2ebf4 --- /dev/null +++ b/Day02.fs @@ -0,0 +1,10 @@ +module AdventOfCode2018.Day02 + +open System + +let parseInput (str : string) : string[] = + str.Split ([| "\r\n"; "\r"; "\n" |], StringSplitOptions.RemoveEmptyEntries) + +let containsN (id : string) : bool = + false + diff --git a/Program.fs b/Program.fs index b3c7fb0..b1bd55c 100644 --- a/Program.fs +++ b/Program.fs @@ -7,9 +7,14 @@ let day01 () = let changes = File.ReadAllText "Data/day01.input" |> Day01.parseInput sprintf "part1 = %A, part2 = %A" (Day01.finalFrequency changes) (Day01.firstDuplicate changes) +let day02 () = + //let input = File.ReadAllText "Data/day02.input" |> Day01.parseInput + "day02" + let days : (unit -> string) array = [| day01 + day02 |] let doDay (n : int) = -- 2.45.2