Iterable
Class Itarray
Implements Iterable<T>
constructor (values: Array<Iterable<T>>): Itarray<T>
Name | Type | Default | Description |
---|---|---|---|
values | Array<Iterable<T>> |
Method .every (fn: (t: T, i: number): boolean): boolean
Name | Type | Default | Description |
---|---|---|---|
fn | (t: T, i: number): boolean |
Method .filter (fn: (t: T, i: number): unknown): Itarray<T>
Name | Type | Default | Description |
---|---|---|---|
fn | (t: T, i: number): unknown |
Method .map (fn: (t: T, i: number): S): Itarray<S>
Name | Type | Default | Description |
---|---|---|---|
fn | (t: T, i: number): S |
Method .slice (from: number, to: number): Itarray<T>
Name | Type | Default | Description |
---|---|---|---|
from | number | ||
to | number |
Method .some (fn: (t: T, i: number): boolean): boolean
Name | Type | Default | Description |
---|---|---|---|
fn | (t: T, i: number): boolean |
every (set: Iterable<T>, callback: (v: T): unknown): boolean
Name | Type | Default | Description |
---|---|---|---|
set | Iterable<T> | ||
callback | (v: T): unknown |
findMin (items: Iterable<T>, value: (item: T): number, max: number, min: number): undefined|T
Find the item in an iterable for which value() returns the smallest value.
Name | Type | Default | Description |
---|---|---|---|
items | Iterable<T> | ||
value | (item: T): number | ||
max | number | … | |
min | number |
flatMap (set: Iterable<T>, map: (x: T): Iterable<S>): Generator<S, void, unknown>
Name | Type | Default | Description |
---|---|---|---|
set | Iterable<T> | ||
map | (x: T): Iterable<S> |
pairs (a: Iterable<S>, b: Iterable<T>): Iterable<[S, T]>
Name | Type | Default | Description |
---|---|---|---|
a | Iterable<S> | ||
b | Iterable<T> |