flix

0.54.0

Collectable

trait Collectable[t: Type]Source

A trait representing collections that can be produced from an Iterator.

Associated Types

type Aef: EffSource

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

type Elm: TypeSource

The element type of the Collectable.

Instances

instance Collectable[Chain[a]]Source
instance Collectable[List[a]]Source
instance Collectable[Set[a]] with Order[a]Source
instance Collectable[Vector[a]]Source

Signatures

def collect(iter: Iterator[Elm[t], ef, r]): t \ ef + Aef[t] + r with Collectable[t] Source

Run an Iterator collecting the results.