Add Enum.group function.

The name `group` seemed like the most logical choice, but maybe there is a better one. I debate whether the `initial` array should be part of the interface. The code is more concise with it, so I did. But maybe it shouldn't be --in which case another method to handle the recursing would be needed.