flix

0.81.0

Collectable

trait Collectable[t: Type]Source

Trait for types that can be collected from an iterator.

Associated Types

type Aef: Eff = {}Source

The associated effect of the Collectable which represents the effect of accessing its elements.

type Elm: TypeSource

The element type of the Collectable.

Instances

Primitives
Vector[a]
Non-primitives
Chain[a], List[a], Set[a]

Signatures

def collect(iter: Iterator[Collectable.Elm[t], ef, r]): t \ { ef, Collectable.Aef[t], Read[r], Write[r] } with Collectable[t]§ Source

Run an Iterator collecting the results.