Iterable

trait Iterable[t: Type]Source

A trait for immutable data structures that can be iterated.

Associated Types

type Aef: EffSource

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

instance Iterable[Array[a, r]]Source
instance Iterable[Chain[a]]Source
instance Iterable[DelayList[a]]Source
instance Iterable[DelayMap[k, v]]Source
instance Iterable[List[a]]Source
instance Iterable[Map[k, v]]Source
instance Iterable[MutDeque[a, r]]Source
instance Iterable[MutList[a, r]]Source
instance Iterable[MutMap[k, v, r]]Source
instance Iterable[MutQueue[a, r]]Source
instance Iterable[MutSet[a, r]]Source
instance Iterable[Nec[a]]Source
instance Iterable[Nel[a]]Source
instance Iterable[Option[a]]Source
instance Iterable[RedBlackTree[k, v]]Source
instance Iterable[Set[a]]Source
instance Iterable[Vector[a]]Source

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.

Trait Definitions

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

Returns an iterator over t zipped with the indices of the elements.