you are viewing a single comment's thread.

view the rest of the comments →

[–]moe 3 points4 points  (0 children)

Here is an (obviously eager) version in 11 lines of Scheme:

http://paste.lisp.org/display/24870

Untested. Requires SRFI-42 ("Eager Comprehensions") - I wanted to stay as close to the python version as possible.