Day 2 skeleton
authorGreg Burri <greg.burri@gmail.com>
Sun, 2 Dec 2018 20:53:46 +0000 (21:53 +0100)
committerGreg Burri <greg.burri@gmail.com>
Sun, 2 Dec 2018 20:53:46 +0000 (21:53 +0100)
AdventOfCode2018.fsproj
Day01.fs
Day02.fs [new file with mode: 0644]
Program.fs

index 5bfcb35..81a24c8 100644 (file)
@@ -1,17 +1,14 @@
-<Project Sdk="Microsoft.NET.Sdk">\r
-\r
+<Project Sdk="Microsoft.NET.Sdk">\r
   <PropertyGroup>\r
     <OutputType>Exe</OutputType>\r
     <TargetFramework>netcoreapp2.1</TargetFramework>\r
   </PropertyGroup>\r
-\r
   <ItemGroup>\r
+    <Compile Include="Day02.fs" />\r
     <Compile Include="Day01.fs" />\r
     <Compile Include="Program.fs" />\r
-\r
-    <Content Include="Data\day01.input">\r
+    <Content Include="Data/day01.input">\r
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>\r
     </Content>\r
   </ItemGroup>\r
-\r
-</Project>\r
+</Project>
\ No newline at end of file
index 5659b61..449fde1 100644 (file)
--- a/Day01.fs
+++ b/Day01.fs
@@ -2,7 +2,6 @@ module AdventOfCode2018.Day01
 \r
 open System\r
 \r
-\r
 let parseInput (str : string) : int[] =\r
     str.Split ([| "\r\n"; "\r"; "\n" |], StringSplitOptions.RemoveEmptyEntries) |> Array.map int\r
 \r
diff --git a/Day02.fs b/Day02.fs
new file mode 100644 (file)
index 0000000..af2ebf4
--- /dev/null
+++ b/Day02.fs
@@ -0,0 +1,10 @@
+module AdventOfCode2018.Day02\r
+\r
+open System\r
+\r
+let parseInput (str : string) : string[] =\r
+    str.Split ([| "\r\n"; "\r"; "\n" |], StringSplitOptions.RemoveEmptyEntries)\r
+\r
+let containsN (id : string) : bool =\r
+    false\r
+\r
index b3c7fb0..b1bd55c 100644 (file)
@@ -7,9 +7,14 @@ let day01 () =
     let changes = File.ReadAllText "Data/day01.input" |> Day01.parseInput\r
     sprintf "part1 = %A, part2 = %A" (Day01.finalFrequency changes) (Day01.firstDuplicate changes)\r
 \r
+let day02 () =\r
+    //let input = File.ReadAllText "Data/day02.input" |> Day01.parseInput\r
+    "day02"\r
+\r
 let days : (unit -> string) array =\r
     [|\r
         day01\r
+        day02\r
     |]\r
 \r
 let doDay (n : int) =\r