elm-nonempty-list
elm-nonempty-list copied to clipboard
Added `consumeWith`.
Thank you for creating and maintaining this package with such a nice API. I would love to use it!
I would like to suggest adding a combinator for applying functions to List.Nonempty, with the type signature a -> List a -> Something.
This kind of signature is commonly found in Elm when a function requires a non-empty collection of a data type, so the combinator fits well with the Nonempty type (please refer to the example code where Random.weighted is applied to Nonempty).
I named this combinator consumeWith, as it conveys the idea of converting Nonempty to another data type, often indicating the end of the role for that Nonempty data. If you prefer a different name, feel free to rename it.