iter
Utility library for functional programming based on ES2015 generators that ensures lazy evaluation of possibly infinite ranges.
Examples
Fizzbuzz generator
; const fizzBuzz = ; ... // => [1, 2, 'fizz', 4, 'buzz', 'fizz', 7, 8 , 'fizz', 'buzz', 11, 'fizz', 13, 14, 'fizzbuzz']
Fibonacci sequence up to the nth number
; const fibonacci = { 0; 1; ;}; ... // => [0, 1, 1, 2, 3, 5, 8, 13]
Methods
assertIterable(iterable)
compact(iterable)
compose(...iterables)
filter(filterFn, iterable)
isIterable(iterable)
map(mapFn, iterable)
pluck(iterable)
slice(fromIdx, len, iterable)
tail(iterable)
take(num, iterable)
unqiue(iterable)
zipWith(zipFn, ...iterables)