elm-debug-controls
elm-debug-controls copied to clipboard
Make Debug.Control.choice take a nonempty list
In the documentation for Debug.Control.choice it says
This will crash if you provide an empty list.
Why not change the type signature to ( String, Control a ) -> List ( String, Control a ) -> Control a
so that can never happen?
Yeah, I think that's a good change. It wasn't done originally because when I ported this to Elm 0.19, it wasn't yet clear what the community preference would be w/r to this sort of API, but I think your proposed type makes sense now.