ForEach
Trait for types that support iterating over their elements with forEach, and its functions.
trait ForEach[t: Type]SourceTrait for types that support iterating over their elements with forEach.
Associated Types
type Aef: Eff = {}SourceThe effect of forEach.
type Elm: TypeSourceThe type of elements in the data structure.
Instances
- Primitives
Array[a, r], Vector[a]- Non-primitives
BPlusTree[k, v, r], 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], WithFilter[t, a], WithIndex[t], WithMap[t, a, b], WithZip[s, t]
Signatures
Module Definitions
def withFilter(p: a -> Bool, m: t): WithFilter[t, a] with ForEach[t] where ForEach.Elm[t] ~ a§ SourceReturns a view for m that filters out elements that don't match p.
Returns a view for m that wraps each element with its index.
Returns a view for m that applies f to each element.