foldr :: (a -> b -> b) -> b -> [a] -> b foldr (-) 0 [1,2,3] = 2
foldl :: (b -> a -> b) -> b -> [a] -> b foldl (-) 0 [1,2,3] = -6
reduce :: b -> (b -> b -> b) -> [b] -> b
foldb :: b->(a->b)->(b->b->b)-> [a] -> b map :: (a -> b) -> [a] -> [b] foldb n f g xs = reduce n g ( map f xs )