1
0
Fork 0
advent-of-code/2020/06/day6.hs
Sloane Perrault e40944b22d solve: day 6
- solve: day 6, part 1
 - solve: day 6, part 2
2022-09-21 09:19:52 -04:00

10 lines
214 B
Haskell

module Day6 (lines') where
lines' = joinLines . lines
joinLines = foldl parse [[]]
where
parse [[]] s = [[s]]
parse [a] "" = [[], a]
parse [a] s = [a ++ [s]]
parse (a:as) s = parse [a] s ++ as