Jeremy Bowers wrote:
I can't figure out how to write a TM in a Python List Comprehension
without one of either "variable binding" (so we can store the last symbol
list and manipulate it in the next iteration) or "recursive function" (to
express the whole tape as a recursive function), both of which require
statements.

Lambdas can give you one-line functions, local variable binding, if-then-else capabilities, and recursion. Everything else should be possible from there.

As a fellow named Church once pointed out, lambdas are really
*all* you need in a language...

--
Greg Ewing, Computer Science Dept,
University of Canterbury,       
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to