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 _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
