Python's itertools module in TypeScript
- accumulate
- batched
- chain
- combinations
- combinations_with_replacement
- compress
- islice
- pairwise
- permutations
- product
- zip_longest
Help us add more
Got a rainy Sunday afternoon and a taste for a porting puzzle?
- Get inspiration from the Python 3 standard library string page.
- Click "New file" in the appropriate folder on GitHub. This will fork the project to your account, directly add the file to it, and send a Pull Request to us.
We will then review it. If it's useful to the project and in line with our contributing guidelines your work will become part of Locutus and you'll be automatically credited in the authors section accordingly.
Upstream Surface Inventory 11/20 shipped • 4 next 55%
Namespace-level inventory for Python 3.12: what we already ship, what we may still want,
and what we intentionally skip or keep.
itertools
73%
shipped
11/15 shipped
4 next
5 explicit non-goals
Shipped (11)
Next
Predicate-based slicing has a clean plain-value contract.
dropwhiletakewhile
Predicate-based filtering has a clean plain-value contract.
filterfalse
Spread-argument mapping still has a clean plain-value contract.
starmap
Explicit non-goals (5)
-
countMany itertools helpers are lazy or stateful iterator factories rather than direct plain values. -
cycleMany itertools helpers are lazy or stateful iterator factories rather than direct plain values. -
groupbyMany itertools helpers are lazy or stateful iterator factories rather than direct plain values. -
repeatMany itertools helpers are lazy or stateful iterator factories rather than direct plain values. -
teeMany itertools helpers are lazy or stateful iterator factories rather than direct plain values.