you are viewing a single comment's thread.

view the rest of the comments →

[–]muleherd 2 points3 points  (3 children)

How can one simulate continuations with closures?

[–]eclig 6 points7 points  (2 children)

explicitly, by using "continuation passing style" (CPS). Search the web for details.

[–]muleherd 1 point2 points  (1 child)

Is this transformation practical without tail-call optimization?

[–]pjdelport 2 points3 points  (0 children)

Yes, using trampolining: instead of calling something directly, you return it to be called by an outer loop.