Bruno Desthuilliers wrote: > Brendon Towle wrote: > > Some of your Lisp translations are subtly off... > > Seems correct to me. Lisp lists are linked lists, not arrays.
Actually, Brendon was correct. In lisp / scheme: (cons 1 '(2 3)) -> (1 2 3) (car '(1 2 3)) -> 1 (cdr '(1 2 3)) -> (2 3) But Brendon's code also needs a correction: [a].extend(b) is wrong, because extend is in-place and returns None, and [a] is anonymous...it needs to be something like: def cons(a, b): b.insert(0, a) return b Regards, Jordan -- http://mail.python.org/mailman/listinfo/python-list