SK calculus is Turing-complete.[1]
A computational system is Turing-complete if it can simulate an universal Turing machine.
We now simulate a call-by-value SK calculus in Scheme, a dialect of Lisp: (define (((S x) y) z) ((x z) (y z)))
(define ((K x) y) x)
Therefore, Lisp is Turing-complete.
[1] Any λ-calculus expression can be converted into S and K by using the following equivalences: (λx.M) = (KM), if x does not occur free in M. (λx.x) = (SKK) (λx.MN) = (S(λx.M)(λx.N))
λ-calculus is Turing-complete. Proving it is left as an exercise for the reader.
>>1
I can write a Brainfuck compiler in Common Lisp.
Brainfuck is essentially a Turing machine (it reads a symbol on a limited memory tape and can change it).
Name:
Anonymous2011-07-15 1:02
>>3 implying Scheme is a dialect of Lisp implying all Lisps have lambda
>>5
It is, they do, and now it works with dynamic scope: (define (S x)
(eval
`(lambda (y)
(let ((x ,x))
(eval
`(lambda (z)
((,x z) (,y z))))))))
(define (K x)
(eval
`(lambda (y) ,x)))