[Haskell-cafe] Re: [Haskell] (.) . (.)

Donald Bruce Stewart dons at cse.unsw.edu.au
Mon May 29 10:47:35 EDT 2006


brianh:
> [moved to cafe]
> Dominic Steinitz wrote:
> >Taral wrote:
> >>On 5/28/06, Dominic Steinitz <dominic.steinitz at blueyonder.co.uk>
> >>wrote:
> >>>Is this defined in some library? Thanks, Dominic.
> >>
> >>Don't think so. I use:
> >>
> >>\a b -> f (g a b)
> >>
> >Taral,
> >
> >Thanks. What prompted this question is that I find myself writing
> >things like:
> >
> >foo = ((.).(.)) concat intersperse
> 
> Hi Dominic -
> I hope it's ok for me to ask this question and I'm absolutely burning with 
> curiosity to find out the answer...
> 
> How did you know to write ((.).(.)) instead of (\f g a b -> f (g a b)) ?

If you play with the @pointless plugin in lambdabot 
    http://haskell.org/haskellwiki/Pointfree

it becomes almost second nature with practice :)

-- Don


More information about the Haskell-Cafe mailing list