Filterable

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

A trait for filtering container functors.

Instances

instance Filterable[Chain]Source
instance Filterable[DelayList]Source
instance Filterable[List]Source
instance Filterable[Map[k]] with Order[k]Source
instance Filterable[Option]Source
instance Filterable[RedBlackTree[k]] with Order[k]Source
instance Filterable[Vector]Source

Signatures

def filterMap(f: a -> Option[b] \ ef, t: m[a]): m[b] \ ef 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 with Filterable[m] Source

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