Clean up lines
This commit is contained in:
parent
ecff477d6e
commit
f2d593837e
|
@ -4,4 +4,6 @@ proc part1*(s: Stream): int =
|
||||||
s.readAll().split("\n\n").mapIt(it.split("\n").foldl(a.union(b.toHashSet), initHashSet[char]()).len).foldl(a + b)
|
s.readAll().split("\n\n").mapIt(it.split("\n").foldl(a.union(b.toHashSet), initHashSet[char]()).len).foldl(a + b)
|
||||||
|
|
||||||
proc part2*(s: Stream): int =
|
proc part2*(s: Stream): int =
|
||||||
s.readAll().split("\n\n").mapIt(it.split("\n").filterIt(it != "").foldl(a.intersection(b.toHashSet), "abcdefghijklmnopqrstuvwxyz".toHashSet()).len).foldl(a + b)
|
s.readAll().split("\n\n").mapIt(
|
||||||
|
it.split("\n").filterIt(it != "").foldl(a.intersection(b.toHashSet), "abcdefghijklmnopqrstuvwxyz".toHashSet()).len
|
||||||
|
).foldl(a + b)
|
||||||
|
|
Loading…
Reference in a new issue