Water collected between towers: Difference between revisions

Content deleted Content added
Hout (talk | contribs)
Hout (talk | contribs)
Line 904:
towerPools :: [Int] -> [(Int, Int)]
towerPools =
((zipWith min . scanl1 max) <*> scanr1 max) >>= zipWith (((,) <*>) . (-))
 
main :: IO ()