Link Search Menu Expand Document

Iterable

iterable.ts#L68

Class Itarray

Implements Iterable<T>

constructor (values: Array<Iterable<T>>): Itarray<T>

Name Type Default Description
values Array<Iterable<T>>    

readonly Property .values

Method .[Symbol.iterator] (): Generator<T, void, unknown>

Method .concat (newValues: Iterable<T>): void

Name Type Default Description
newValues 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    

static Method .make (fn: (i: number): T, max: number): Itarray<T>

Name Type Default Description
fn (i: number): T    
max number    
iterable.ts#L11

every (set: Iterable<T>, callback: (v: T): unknown): boolean

Name Type Default Description
set Iterable<T>    
callback (v: T): unknown    
iterable.ts#L51

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    
iterable.ts#L7

first (set: Iterable<T>): undefined|T

Name Type Default Description
set Iterable<T>    
iterable.ts#L25

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>    
iterable.ts#L41

listPairs (list: Array<T>): Iterable<[T, T]>

Name Type Default Description
list Array<T>    
iterable.ts#L33

pairs (a: Iterable<S>, b: Iterable<T>): Iterable<[S, T]>

Name Type Default Description
a Iterable<S>    
b Iterable<T>    
iterable.ts#L18

some (set: Iterable<T>, callback: (v: T): unknown): boolean

Name Type Default Description
set Iterable<T>    
callback (v: T): unknown    

Copyright © 2022 Mathigon.org