Water collected between towers: Difference between revisions

m
Line 904:
towerPools :: [Int] -> [(Int, Int)]
towerPools =
zipWith min . scanl1 max <*> scanr1 max >>= zipWith (((,) <*>) (,) . (-))
 
main :: IO ()
9,659

edits