Safe Haskell | None |
---|---|

Language | Haskell98 |

Create clusters of non-overlapping things.

# Documentation

cluster :: (a -> (C, [C])) -> [a] -> [[a]] Source #

Given a function `f :: a -> (C,[C])`

which returns a non-empty list of
characteristics `C`

of `a`

, partition a list of `a`

s into groups
such that each element in a group shares at least one characteristic
with at least one other element of the group.