itertools 1.0.0

Additional range primitives for iteration


To use this package, run the following command in your project's root directory:

itertools

Additional range primitives for iterations. (inspired by Python)

Build Status

Methods

pairwise

Iterates over a range in pairs. Allows non-filling end intervals:

[1,2,3].pairwise().array == [[1,2],[2,3]]

Params:

r = Range from which the minimum will be selected
pairLength = Pair size (default 2)

Returns: The minimum of the passed-in values.

splitwise

Iterates over a range in splits. Allows non-filling end intervals:

[1,2,3].splitwise().array == [[1,2],[3]]

Params:

r = Range from which the minimum will be selected
pairLength = 

Returns: The minimum of the passed-in values.

TODO

  • Decide whether it is ok to have transient iterators
  • use a better method instead of the circular buffer with dup for pairwise
Authors:
  • greenify
Dependencies:
none
Versions:
1.1.0 2016-Feb-27
1.0.0 2016-Feb-26
~master 2016-May-03
Show all 3 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 0 downloads total

Score:
0.4
Short URL:
itertools.dub.pm