Iterable

class Iterable<A>(aas: ContSeq.Iterable<A>) : ContSeq<A>

Functions

Link copied to clipboard
fun drain()

Runs the sequence of computations, but ignore the output of every computation

Link copied to clipboard
fun <B> flatMap(f: (A) -> ContSeq<B>): ContSeq<B>
Link copied to clipboard
inline fun forEach(f: (A) -> Unit)

Alias for for-looping over all elements. Most efficient way to derive combinators.

Link copied to clipboard
open operator override fun iterator(): Iterator<A>
Link copied to clipboard
fun <B> map(f: suspend ContSyntax.(A) -> B): ContSeq<B>

Maps every element in the sequence with f, and allows for aborting the mapped value using ContSyntax.abort or ContSyntax.ensure.

Link copied to clipboard
inline fun onEach(crossinline f: (A) -> Unit): ContSeq<A>

Side-effecting version of map

Link copied to clipboard
fun toList(): List<A>

Turns ContSeq into an in-memory representation as a List

Link copied to clipboard
fun toSet(): Set<A>

Turns ContSeq into an in-memory representation as a Set

Link copied to clipboard
fun void(): ContSeq<Unit>

Throws away the output of every emission

Link copied to clipboard
inline fun <B, C> zip(fb: ContSeq<B>, crossinline f: (A, B) -> C): ContSeq<C>