5 read :: *File -> [[Int]]
8 | l.[size l - 1] <> '\n' = []
9 = [let c = [if (c == '#') 1 0\\c<-:l | c <> '\n'] ++ c in c:read f]
16 one ls :== slope ls (3, 1)
19 two ls = prod (map (slope ls) [(1,1), (3,1), (5,1), (7,1), (1,2)])
21 slope :: [[Int]] (Int, Int) -> Int
23 slope xs=:[[c:_]:_] d=:(right, down) = c + slope (map (drop right) (drop down xs)) d