All Projects → rtfeldman → selectlist

rtfeldman / selectlist

Licence: BSD-3-Clause license
A nonempty list in which exactly one element is always selected.

Programming Languages

elm
856 projects

SelectList

A SelectList is a nonempty list which always has exactly one element selected.

It is an example of a list zipper.

myList =
    SelectList.fromLists [ 1, 2 ] 3 [ 4, 5, 6 ]

SelectList.before myList
--> [ 1, 2 ]

SelectList.after myList
--> [ 3, 4, 5 ]

SelectList.selected myList
--> 3
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].