Accumulate.hs

1
2
3
4
5
module Accumulate where

accumulate :: (a -> b) -> [a] -> [b]
accumulate _ [] = []
accumulate fn (x:xs) = fn x : accumulate fn xs

@qnikst and @Abbath think this looks great

Comments


You're not logged in right now. Please login via GitHub to comment