[Haskell] (.) . (.)

Robert Dockins robdockins at fastmail.fm
Sun May 28 16:47:47 EDT 2006


On Sunday 28 May 2006 04:17 pm, Lennart Augustsson wrote:
> Why not ask the computer?
>
> 	-- Lennart

[snip]

Another proof-by-calculation:
-----------------------------------------------------------

The Lambda Shell, version 0.2
Copyright 2005-2006, Robert Dockins


The Lambda Shell comes with ABSOLUTELY NO WARRANTY; for details
type ':nowarranty'.  This is free software, and you are welcome to
redistribute it under certain conditions; type ':gpl'
for details

> let c = \f g x. f (g x)
> c c c
\x g x_0 x_1. x (g x_0 x_1)
> :trace
trace on
> c c c
1) c c c
2) (\f g x. f (g x)) c c
3) (\g x. c (g x)) c
4) \x. c (c x)
5) \x. (\f g x_0. f (g x_0)) (c x)
6) \x g x_0. c x (g x_0)
7) \x g x_0. (\f g_1 x_2. f (g_1 x_2)) x (g x_0)
8) \x g x_0. (\g_1 x_2. x (g_1 x_2)) (g x_0)
9) \x g x_0 x_1. x (g x_0 x_1)


-- 
Rob Dockins

Talk softly and drive a Sherman tank.
Laugh hard, it's a long way to the bank.
       -- TMBG


More information about the Haskell mailing list