miyamoen/select-list/3.0.0

NOTE: the latest version is 4.1.0

Yet another SelectList implementation

A SelectList is a non-empty list which always has exactly one element selected. It is an example of a list zipper.

Inspired by these modules

mapBy is the main function in this package. Use mapBy in view.

    view : SelectList String -> Html Msg
    view selectList =
        ul [] <|
            SelectList.mapBy
                (\position item ->
                    li [ onClick (Set item) ]
                        [ text <| toString <| SelectList.index item
                        , toString <| SelectList.selected item
                        ]
                )
                selectList

example