
hi, Is there a function like "map (map f) list" i.e. map of map ? And second why when I try do do function composition i.e. : newf = map . f But this works : newf x = map (f x) thanx

On Friday 09 December 2005 17:31, Christian Maeder wrote:
raptor wrote:
And second why when I try do do function composition i.e. :
newf = map . f
But this works :
newf x = map (f x)
Does f has constraints? It should work with a type signature.
To elaborate this very short comment: The above definition for newf is rejected because of the (infamous) monomorphism restriction. Either supply a type signature or an argument so that Haskell knows you want to define a function, not data. Ben

On Fri, Dec 09, 2005 at 08:23:47PM +0200, raptor wrote:
Is there a function like "map (map f) list" i.e. map of map ?
Yes, it's "map (map f) list" :-) Best regards Tomasz -- I am searching for a programmer who is good at least in some of [Haskell, ML, C++, Linux, FreeBSD, math] for work in Warsaw, Poland
participants (4)
-
Benjamin Franksen
-
Christian Maeder
-
raptor
-
Tomasz Zielonka