HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulefiltrable-0.1.6.0Haskell2010

Data.Filtrable

  • 1 class
  • 6 values
  • Packagefiltrable-0.1.6.0
  • Exports7
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceFiltrable.hs
classclass Functor f => Filtrable (f :: Type -> Type) where
#

Class of filtrable containers, i.e. containers we can map over while selectively dropping elements.

Laws:

Laws if Foldable f:

Methods

Instances12Filtrable, …
valuenubBy :: (Filtrable f, Traversable f) => (a -> a -> Bool) -> f a -> f a
#

\mathcal{O}(n^2) Delete all but the first copy of each element, with the given relation.

valuenubOrdBy
  1. :: (Filtrable f, Traversable f)
  2. => a -> a -> Ordering
  3. -> f a
  4. -> f a
#

\mathcal{O}(n\;\mathrm{log}\;n) Delete all but the first copy of each element, with the given relation.