mirror of
https://github.com/Smaug123/AdventOfCode2022
synced 2025-10-08 02:58:39 +00:00
Add gitattributes to ensure we do have newlines (#1)
This commit is contained in:
3
.gitattributes
vendored
Normal file
3
.gitattributes
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
* text=auto
|
||||
*.sh text=lf
|
||||
*.txt text=lf
|
@@ -2,9 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
<GenerateProgramFile>false</GenerateProgramFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@@ -11,9 +11,7 @@ module Day1 =
|
||||
if String.IsNullOrWhiteSpace line then
|
||||
0, (acc :: counts)
|
||||
else
|
||||
match Int32.TryParse line with
|
||||
| false, _ -> failwithf "not an int: %s" line
|
||||
| true, v -> acc + v, counts
|
||||
acc + int line, counts
|
||||
)
|
||||
|> snd
|
||||
|
||||
|
Reference in New Issue
Block a user