Given the following (usual) definition of "map":
map :: (a -> b) -> [a] -> [b]
map f [] = []
map f (x : xs) = f x : map f xs
What's the type of "map map"?
GHCi's :t command reveals:
*Main> :t map map
map map :: [a -> b] -> [[a] -> [b]]
I'd be grateful if anyone could provide a systematic type calculation so that I
can reason through more complicated examples myself.
Thanks.
_________________________________________________________________
Windows Liveā¢: Life without walls.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_032009
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe