[Haskell-cafe] Exercise in point free-style

Neil Mitchell ndmitchell at gmail.com
Fri Sep 1 11:43:40 EDT 2006


Hi Julien,

> func3 f l = l ++ map f l
func3 f = ap (++) (map f)
func3 = ap (++) . map

> Looks pretty clear and simple. However, I can't come up with a solution.
> Is it even possible to remove one of the variables, f or l? If so, how?
I have no idea how to do this - the solution is to log into #haskell
irc and fire off @pl - which automatically converts things to point
free form. I'm not sure if its possible to do without the auxiliary ap
(which is defined in Monad).

Thanks

Neil


More information about the Haskell-Cafe mailing list