Unfortunately I don't know lambda [or for that matter, regular] calculus...
On Tue, Oct 11, 2011 at 12:01 AM, Alain Ketterlin <al...@dpt-info.u-strasbg.fr> wrote: > Alec Taylor <alec.tayl...@gmail.com> writes: > >> On Sun, Oct 9, 2011 at 3:08 AM, Steven D'Aprano >> <steve+comp.lang.pyt...@pearwood.info> wrote: > >>> def true(x, y): >>> return x >>> >>> def false(x, y): >>> return y > [...] >>> def Nand(a, b): >>> return (lambda c: lambda x, y: c(y, x))(a(b, a)) >>> >>> and we're done. [...] > >> Awesome > > Yes, that's how Church defined booleans in the lambda calculus. See > http://en.wikipedia.org/wiki/Church_encoding for encodings of natural > numbers and lists. > > -- Alain. > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mailman/listinfo/python-list