Types in Haskell

Posted by Linda Cohen on Stack Overflow See other posts from Stack Overflow or by Linda Cohen
Published on 2010-05-11T18:41:53Z Indexed on 2010/05/11 19:14 UTC
Read the original article Hit count: 209

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!

© Stack Overflow or respective owner

Related posts about haskell

Related posts about inferred-type