[Haskell-cafe] principle types

Vikrant vikrant.patil at gmail.com
Wed Mar 14 12:01:07 EDT 2007

   I can understand why principle type of map is

map :: (a -> b) -> [a] -> [b] ,
I would interpret this as "map takes a function of type a->b and a list of
type [a] as arguments and returns a list of type [b]"

but it is going somewhat beyond my imagination why principle type of map map

(map map)::[a -> b] -> [[a] -> [b]]

I am able to interpret the expressions "[a -> b] -> [[a] -> [b]]"

does this mean that 'map map' takes list of functions of type (a->b) and
returns list of functions of type ([a]->[b])
if yes ..how do I derive it from basic type declaration of map?

Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20070314/dd8213a9/attachment-0001.htm

More information about the Haskell-Cafe mailing list