Closed sharkdp closed 8 years ago
select :: forall e a. Label -> NonEmpty (Array a) -> (a -> String) -> UI e a
data Foo = A | B | C | D
fooToStr :: Foo -> String
fooToStr = ...
select "One of:" (A :| [B, C, D]) fooToStr
This would also be a good opportunity to change Array
to Foldable
(Relies on https://github.com/purescript/purescript-arrays/pull/55):
select "One of:" (A :| B : C : D : Nil) fooToStr
The API for
select
andradioGroup
would be much nicer withNonEmpty a
instead of.. -> a -> Array a -> ..
.