Skip to content
This repository was archived by the owner on May 6, 2022. It is now read-only.
OnesimusUnbound edited this page Sep 27, 2012 · 6 revisions

Welcome to itertool.js

The itertool.js is a port of Python's itertools, using Mozilla JavaScript's Iterator for the Iterator model.

I have been inspired by the real-world application of generator (and lazy evaluation in general) using Python, and I hope to bring this benefit to JavaScript. However, only SpiderMonkey and Rhino implements yield, which makes the creation of generator and iterator hard apart from yield.

Fortunately, since JavaScript has closure, then it can be exploited to simulate lazy evaluation through persistence of generator state.

Other Articles

Clone this wiki locally