Cardinality-0.2: Measure container capacity. Use it to safely change container.

Data.NeverEmptyList

Synopsis

Documentation

nel2List :: NeverEmptyList a -> [a]Source

neverEmptyList2List (NEL h t) = h:t

list2nel :: [a] -> Maybe (NeverEmptyList a)Source

list2NeverEmptyList [] = Nothing
list2NeverEmptyList (h:t) = Just (NEL h t)