IterTools.jl icon indicating copy to clipboard operation
IterTools.jl copied to clipboard

Common functional iterator patterns

Results 31 IterTools.jl issues
Sort by recently updated
recently updated
newest added

useful function analogous to python one in more_itertools

Extracts the changes which were lost when https://github.com/JuliaCollections/IterTools.jl/pull/88 was closed.

Adds the following function: imerge(a,b, predicate = Bool`: Whether to pick the next element of `a` (true) or `b` (false). - `fa(ak)`, `fb(bk)`: Functions to apply to the picked elements...

I frequently like to use `partition` for a sliding window over a fixed array, like `partition(arr, 2, 1)` to get a set of pairs. The issue is that this code...

Adds "Alternate", an iterator that cycles through a number of iterators until one of them runs out. ```julia julia> println(alternate(1:5,"the",-(1:5))); 1 t -1 2 h -2 3 e -3 4...

This is an implementation of #57.

Add function `each(ElementType, collection)` that returns an iterable with `eltype

Julia's Base have an often-used `zip` function, which terminates as soon as any of the iterators are finished. Stopping when _any_ of the iterators is finished, is one of the...

The current `takewhile` is very convient to use. But for cases in which I also want to take the last value which fails the condition, it cannot do what I...

There are some differences between `Base.Iterators.partition` and `IterTools.partition`. I brought it up on Slack and @oxinabox asked me to file an issue. 1. `Base.Iterators.partition` returns each chunk as an `Array`,...