Module

Data.Filterable

Package
purescript-filterables
Repository
Risto-Stevcev/purescript-filterables

#Filterable Source

class (Foldable f) <= Filterable f  where

The Filterable class provides a filtering operation for Foldable structures.

Instances must satisfy the following laws in addition to Foldable laws:

  • filter (\_ → true) x == x
  • filter (\_ → false) x == mempty
  • length (filter f x) <= length x

Members

Instances

#verifyFilter Source

verifyFilter :: forall f h a. Eq (f a) => Monoid (f a) => BooleanEq h => Filterable f => (a -> h) -> f a -> Boolean

#defaultFilter Source

defaultFilter :: forall f h a. BooleanEq h => Applicative f => Foldable f => Monoid (f a) => (a -> h) -> f a -> f a