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

ModuleAgda-2.7.0.1Haskell2010

Agda.Utils.Cluster

Create clusters of non-overlapping things.

  • 4 values
  • PackageAgda-2.7.0.1
  • 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.