Browse Source

Deal with weird input with trailing LFs.

master
Chris Smith 5 years ago
parent
commit
b912574e44
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      day01.nim

+ 1
- 1
day01.nim View File

@@ -1,6 +1,6 @@
1 1
 import intsets, math, sequtils, strutils
2 2
 
3
-let input = readFile("data/01.txt").splitLines.map(parseInt)
3
+let input = readFile("data/01.txt").splitLines.filter(proc(x: string): bool = x != "").map(parseInt)
4 4
 
5 5
 proc part1(freqs: seq[int]): int =
6 6
     freqs.sum