Iterable
import { Iterable } from "@fed1/jsos/iteration";
A TTrait that abstracts iteration.
Methods
This trait requires the following methods to be implemented.
Iterable.iterate(data)
def(iterate, [TAny], data => /* ... */)
Returns either an array containing the first item of data and the state (key),
or null if data is empty.
See: iterate()
Iterable.iterate(data, state)
def(iterate, [TAny, TAny], (data, state) => /* ... */)
Returns either an array containing the next item of, and the next key in, data
according to state, or null if there is no next item.
See: iterate()
Version History
| Feature | Since version |
|---|---|
| Iterable | 1.0 |
