chickadee » combinators » group/key

(group/key FUNC LYST [EQUALITY equal?])procedure

Groups a LYST of elements by some key attribute. Uses the single-argument FUNC to retrieve key values & the EQUALITY function to compare them.

The LYST must be in sorted order with respect to the key!

Returns a list of grouped elements.