SquirclesIO/elm-utils/1.0.0

Formerly PerformanceIMMO/elm-utils. Search finds this package by either name.

Perfimmo.Collection.Dict

function to index a List to a Dict of Nonempty List

nonemptyGroupBy : (a -> comparable) -> List a -> Dict comparable (Nonempty a)

nonemptyGroupBy takes a key-fn and a list. Creates a Dict which maps the key to a Nonempty list of matching elements.