flix

0.79.0

Filterable

trait Filterable[m: Type -> Type] with Functor[m], Foldable[m]Source

Trait for types that support filtering.

Instances

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

Signatures

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

Applies the partial function f to every element in x collecting the results.

Trait Definitions

def filter(f: a -> Bool \ ef, t: m[a]): m[a] \ ef + Aef[m] with Filterable[m]§ Source

Applies f to every element in x. Keeps every element that satisfies f.