diff --git a/2020/src/day6.nim b/2020/src/day6.nim index 40d18dd..5a75649 100644 --- a/2020/src/day6.nim +++ b/2020/src/day6.nim @@ -7,4 +7,4 @@ proc part1*(s: Stream): int = s.asGroups.mapIt(it.foldl(a.union(b.toHashSet), initHashSet[char]()).len).foldl a + b proc part2*(s: Stream): int = - s.asGroups.mapIt(it.foldl(a.intersection(b.toHashSet), toSeq('a'..'z').toHashSet).len).foldl(a + b) + s.asGroups.mapIt(it.foldl(a.intersection(b.toHashSet), toSeq('a'..'z').toHashSet).len).foldl a + b