import * as iter from "https://deno.land/x/iter@v3.2.3/mod.ts";
Variables
Curried functions. Note that only functions which take an iterable as a first argument, and accept more than one argument, are curried. | |
License of the module | |
Version of the module |
Functions
Finds the average of all items in | |
Splits an iterable into evenly sized chunks. See @sindresorhus/chunkify | |
Lazily flattens a nested iterable completely, such that none of its yielded values are iterable. | |
Combines two or more iterables. | |
Creates an endless iterable of a constant value. | |
Creates an endless iterable from the return values of a function. | |
Creates an iterable from IteratorResults returned by a function. | |
Creates an iterable over a string's char codes. | |
Creates an iterable over a string's chars. | |
Constructs an iterable from an iterable of its results. | |
Creates an endless iterable of incrementing numbers. | |
Creates an endless iterable of pseudorandom numbers. | |
Creates an iterable over an inclusive range of numbers. | |
f drop | Returns a new iterable containing the items of |
Returns a new iterable which skips items from | |
Returns a new iterable which skips items from | |
Determines whether the specified callback function returns true for all items in an iterable. | |
Returns the items of an iterable that meet the condition specified in a callback function. | |
f find | Returns the value of the first item in the iterable where predicate is true, and undefined otherwise. |
Returns the index of the first item in the iterable where predicate is true, and -1 otherwise. | |
f flat | Lazily flattens a nested iterable to a given depth. Similar to
|
Lazily calls a defined callback function for each element of an iterable, and returns a new flattened iterable of the results by one level. | |
Performs the specified action for each item in an iterable, consuming the iterable in the process. | |
f fuse | Strips and fuses an iterable, such that any results including and after a
result with |
Determines whether an iterable includes a certain element, returning true or false as appropriate. | |
Converts an iterable into a series of pairs of indices and values. Similar to
| |
Performs the specified action for each item in an iterable when the returned
iterable is iterated over. Like forEach | | |
f map | Lazily calls a defined callback function for each element of an iterable, and returns a new iterable of the results. |
f norm | Finds the norm of |
f pair | Creates a new iterable containing tuples of each element of |
Generates a peekable iterator from the provided iterable (See Peekable).
Note that unlike other transformers, this returns an extended | |
Finds the product of all items in | |
Calls the specified callback function for all the items in an iterable. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. | |
Makes an iterable remember. Each time it is iterated over it will yield the same results. | |
f some | Determines whether the specified callback function returns true for any item in an iterable. |
f sum | Finds the sum of all items in |
f take | Returns a new iterable containing the first |
Returns a new iterable which yields while | |
Returns a new iterable which yields until |
Interfaces
endlessFrom | | |
from | | |
A curried version of an | |
The same as the | |
Iterable predicate callback. | |
Type for all iterable functions in the library. | |
An iterator that defines a peeking mechanism.
Inspired by Rust's | |
Generic predicate callback. | |
reduce | | |
reduce | |
Type Aliases
Alias for an | |
An alias for a special case of |