HORIZON HASKELLDocsmaster5ff592b2026-10-19Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · master · 5ff592b · 2026-10-19

Modulecabal-install-solver-3.18.1.0

Distribution.Solver.Modular.ConflictSet

  • 4 types
  • 17 values
valuefilter :: (a -> Bool) -> [a] -> [a]
#

\mathcal{O}(n). filter, applied to a predicate and a list, returns the list of those elements that satisfy the predicate; i.e.,

filter p xs = [ x | x <- xs, p x]
Examples
Example1 expression
filter odd [1, 2, 3][1,3]
Example1 expression
filter (\l -> length l > 3) ["Hello", ", ", "World", "!"]["Hello","World"]
Example1 expression
filter (/= 3) [1, 2, 3, 4, 3, 2, 1][1,2,4,2,1]
newtypenewtype ConflictSet
#
Instances2Eq, Show
  • Eq ConflictSetDefined in cabal-install-solver-3.18.1.0 · Distribution.Solver.Modular.ConflictSet
  • Show ConflictSetDefined in cabal-install-solver-3.18.1.0 · Distribution.Solver.Modular.ConflictSet