[Haskell] (.) . (.)
Dominic Steinitz
dominic.steinitz at blueyonder.co.uk
Mon May 29 02:28:29 EDT 2006
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
I think
foo' = \a b -> concat (intersperse a b)
is probably clearer but I ended up writing
infixr $.
($.) = (.) . (.)
and then
foo' = concat $. intersperse
Of course one could go on and define
infixr $..
($..) = (.) . (.) . (.)
and so on.
I just wondered if there was a standard nomenclature for such functions
a la liftM, liftM2 etc?
The answer seems to be no.
Thanks, Dominic.
More information about the Haskell
mailing list