Types in Haskell
- by Linda Cohen
I'm kind of new in Haskell and I have difficulty understanding how inferred types and such works.
map :: (a -> b) -> [a] -> [b]
(.) :: (a -> b) -> (c -> a) -> c -> b
What EXACTLY does that mean?
foldr :: (a -> b -> b) -> b -> [a] -> b
foldl :: (a -> b -> a) -> a -> [b] -> a
foldl1 :: (a -> a -> a) -> [a] -> a
What are the differences between these?
And how would I define the inferred type of something like
foldr map
THANKS!