Consider the problem where you have a list which needs to be split into multiple lists (buckets) given a function given an element and returning the index of the destination list (bucket). The output of the operation is a list of lists.
What’s the correct name for this operation?
One name would be grouping: the Scala function that does this is
groupBy(though it returns a Map from discriminator keys to Lists instead of the list of lists you’re asking for).