flix

0.79.0

Witherable

trait Witherable[t: Type -> Type] with Traversable[t], Filterable[t]Source

Trait for types that can be traversed from left to right with an applicative functor while filtering elements.

Instances

Primitives
Vector
Non-primitives
Chain, DelayList, List, Map[k], Option, RedBlackTree[k]

Trait Definitions

def sequenceWither(t: t[m[Option[a]]]): m[t[a]] \ Aef[t] with Witherable[t], Applicative[m]§ Source

Returns the result of running all the actions in the data structure t.

def wither(f: a -> m[Option[b]] \ ef, t: t[a]): m[t[b]] \ ef + Aef[t] with Witherable[t], Applicative[m]§ Source

Returns the result of applying the applicative partial mapping function f to all the elements of the data structure t.