HORIZON HASKELLDocslts/ghc-9.14.x45dd5372026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

ModuleAgda-2.8.0.2Haskell2010

Agda.Utils.Cluster

Create clusters of non-overlapping things.

  • 4 values
  • PackageAgda-2.8.0.2
  • Exports4
  • LanguageHaskell2010
  • LicenceMIT
  • SourceCluster.hs
valuecluster :: Ord c => (a -> NonEmpty c) -> [a] -> [NonEmpty a]
#

Given a function f :: a -> NonEmpty c which returns a non-empty list of characteristics of a, partition a list of as into groups such that each element in a group shares at least one characteristic with at least one other element of the group.

valuecluster' :: Ord c => [(a, NonEmpty c)] -> [NonEmpty a]
#

Partition a list of as paired with a non-empty list of characteristics into groups such that each element in a group shares at least one characteristic with at least one other element of the group.

valuecluster1
  1. :: Ord c
  2. => a -> NonEmpty c
  3. -> NonEmpty a
  4. -> NonEmpty (NonEmpty a)
#

Given a function f :: a -> NonEmpty c which returns a non-empty list of characteristics of a, partition a non-empty list of as into groups such that each element in a group shares at least one characteristic with at least one other element of the group.

valuecluster1' :: Ord c => NonEmpty (a, NonEmpty c) -> NonEmpty (NonEmpty a)
#

Partition a non-empty list of as paired with a non-empty list of characteristics into groups such that each element in a group shares at least one characteristic with at least one other element of the group.