Skip to content

module itertools

Source: stdlib/itertools.codon


count(start: T = 0, step: T = 1, T: type) @inline Function always inlined


cycle(iterable: Generator[T], T: type) @inline Function always inlined


repeat(object: T, times: Optional[int] = None, T: type) @inline Function always inlined


accumulate(iterable: Generator[T], func = lambda a, b: (a + b), initial = 0, T: type) @inline Function always inlined


accumulate(iterable: Generator[T], func = lambda a, b: (a + b), T: type) @inline Function always inlined @overload Function is overloaded


chain @tuple Class is named tuple (cannot write fields)

Magic methods

__new__(*iterables) @inline Function always inlined

Methods

from_iterable(iterables) @inline Function always inlined


compress(data: Generator[T], selectors: Generator[B], T: type, B: type) @inline Function always inlined


dropwhile(predicate: CallableTrait[T, bool], iterable: Generator[T], T: type) @inline Function always inlined


filterfalse(predicate: CallableTrait[T, bool], iterable: Generator[T], T: type) @inline Function always inlined


groupby(iterable, key = Optional[int]()) @inline Function always inlined


islice(iterable: Generator[T], stop: Optional[int], T: type)


islice(iterable: Generator[T], start: Optional[int], stop: Optional[int], step: Optional[int] = None, T: type) @overload Function is overloaded


starmap(function, iterable) @inline Function always inlined


takewhile(predicate: CallableTrait[T, bool], iterable: Generator[T], T: type) @inline Function always inlined


tee(iterable: Generator[T], n: int = 2, T: type)


zip_longest(*iterables, fillvalue) @inline Function always inlined


zip_longest(*args) @inline Function always inlined @overload Function is overloaded


product(*iterables, repeat: int)


product(*iterables, repeat: Literal[int] = 1) @overload Function is overloaded


combinations(pool, r: int)


combinations(pool, r: Literal[int]) @overload Function is overloaded


combinations_with_replacement(pool, r: int)


combinations_with_replacement(pool, r: Literal[int]) @overload Function is overloaded


permutations(pool, r = None)


permutations(pool, r: Literal[int]) @overload Function is overloaded