[Haskell] (.) . (.)

Brian Hulley brianh at metamilk.com
Sun May 28 16:24:21 EDT 2006


Brian Hulley 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)
> 
> I don't see how (.) . (.) translates into something so simple.
> Using c for (.) to make things easier to write, I get:
> 
> (.) . (.)
> === c c c
> === \x -> (c c c x)
> === \x -> (c (c x))
> === \x -> (\y z -> c (c x) y z)

Here was one error              ^^^^
so fixing it and continuing:

\x -> (c (c x))
=== \x -> (\y z -> c (c x) z y)
=== \x -> (\y z -> (c x) (z y))
=== \x -> (\y z -> (\p q -> c x q p) (z y))
=== \x -> (\y z -> (\p q -> x (q p)) (z y))
=== \x -> (\y z -> (\q -> x (q (z y))))

=== \x y z q -> x (q (z y))

But it still doesn't match f (g a b)...

Regards, Brian.


More information about the Haskell mailing list