flix

0.79.0

Iterable

trait Iterable[t: Type]Source

Trait for types that can be iterated.

Instances are immutable data structures.

Associated Types

type Aef: Eff = {}Source

The associated effect of creating the Iterable and accessing the elements in the underlying data structure or generator.

The effect is embedded in the type of the Iterator.

type Elm: TypeSource

The element type of the Iterable.

Instances

Primitives
Array[a, r], Vector[a]
Non-primitives
Chain[a], DelayList[a], DelayMap[k, v], List[a], Map[k, v], MutDeque[a, r], MutHashMap[k, v, r], MutHashSet[a, r], MutList[a, r], MutMap[k, v, r], MutPriorityQueue[a, r], MutSet[a, r], Nec[a], Nel[a], Option[a], Range[t], RedBlackTree[k, v], Set[a]

Signatures

def iterator(rc: Region[r], t: t): Iterator[Elm[t], r + aef, r] \ r + aef with Iterable[t] where Iterable.Aef[t] ~ aef§ Source

Returns an iterator over t.