Create a NonEmptyList
from a List
.
Create a NonEmptyList
from a List
.
The result will be None
if the input list is empty and Some
wrapping a
NonEmptyList
otherwise.
fromListUnsafe for an unsafe version that throws an exception if the input list is empty.
Create a NonEmptyList
from a List
, or throw an
IllegalArgumentException
if the input list is empty.
Create a NonEmptyList
from a List
, or throw an
IllegalArgumentException
if the input list is empty.
fromList for a safe version that returns None
if the input list
is empty.