generate

Creates a finite KoneSequence of the given size by invoking the initializer function for each index on each element access.

Return

A new KoneSequence instance.

Parameters

size

The number of elements in the sequence.

initializer

The function that provides an element for each index.

Type Parameters

Element

The type of elements.


Creates a KoneSequence for the given indices range by invoking the initializer function for each index on each element access.

Return

A new KoneSequence instance.

Parameters

indices

The range of indices to generate elements for.

initializer

The function that provides an element for each index.

Type Parameters

Element

The type of elements.


Creates an infinite KoneSequence by invoking the initializer function for each index (i.e. for each natural number from 0 to positive infinity).

Return

An infinite KoneSequence instance.

Parameters

initializer

The function that provides an element for each index.

Type Parameters

Element

The type of elements.