SplitScript reference / MapIterator<I, S, U> / next
MapIterator<I, S, U>.next
Method
MapIterator<I, S, U>.next() -> IteratorStep<U> where I: Iterator
Advances and transforms one source item.
Exhaustion passes through without invoking the transformation.
Effects: pure
Runtime behavior: available everywhere; synchronous
Examples
Pull one transformed item
let iterator = [1, 2].iterator().map(value => value * 10)
let first = iterator.next()