Std.NonEmpty
29 public declarations
- all
&Std.NonEmpty.NonEmpty[T] -> fn(T) -> Bool -> BoolWhether every element satisfies a test.
- any
&Std.NonEmpty.NonEmpty[T] -> fn(T) -> Bool -> BoolWhether any element satisfies a test.
- append
&Std.NonEmpty.NonEmpty[T] -> T -> Std.NonEmpty.NonEmpty[T]An element added to the end.
- concat
&Std.NonEmpty.NonEmpty[T] -> &Std.NonEmpty.NonEmpty[T] -> Std.NonEmpty.NonEmpty[T]Two sequences joined.
- contains
&Std.NonEmpty.NonEmpty[T] -> T -> Bool where T: EqWhether an element is present.
- filter
&Std.NonEmpty.NonEmpty[T] -> fn(T) -> Bool -> Array[T]The elements that satisfy a test, as an ordinary array — filtering can
- find
&Std.NonEmpty.NonEmpty[T] -> fn(T) -> Bool -> Option[T]The first element satisfying a test, or `None`.
- first
&Std.NonEmpty.NonEmpty[T] -> TThe first element. There is always one.
- fold
&Std.NonEmpty.NonEmpty[T] -> A -> fn(A, T) -> A -> AThe elements combined from the left, starting from a value of your own.
- fromArray
&Array[T] -> Option[Std.NonEmpty.NonEmpty[T]]An array as a non-empty sequence, or `None` when it is empty.
- group
&Array[T] -> Array[Std.NonEmpty.NonEmpty[T]] where T: EqAdjacent equal elements gathered.
- groupBy
&Array[T] -> fn(T, T) -> Bool -> Array[Std.NonEmpty.NonEmpty[T]]Adjacent equal elements gathered, each group non-empty by construction.
- last
&Std.NonEmpty.NonEmpty[T] -> TThe last element. There is always one.
- length
&Std.NonEmpty.NonEmpty[T] -> IntHow many elements there are, which is never fewer than one.
- make
T -> Array[T] -> Std.NonEmpty.NonEmpty[T]A head and the rest.
- map
&Std.NonEmpty.NonEmpty[A] -> fn(A) -> B -> Std.NonEmpty.NonEmpty[B]Every element transformed. A sequence that had one still has one.
- maximum
&Std.NonEmpty.NonEmpty[T] -> T where T: OrdThe largest element. There is always one.
- maximumBy
&Std.NonEmpty.NonEmpty[T] -> fn(T, T) -> Bool -> TThe largest element under an ordering. There is always one.
- minimum
&Std.NonEmpty.NonEmpty[T] -> T where T: OrdThe smallest element. There is always one, so this answers a value rather
- minimumBy
&Std.NonEmpty.NonEmpty[T] -> fn(T, T) -> Bool -> TThe smallest element under an ordering. There is always one.
- NonEmpty
A sequence that has at least one element, and says so in its type.
- one
T -> Std.NonEmpty.NonEmpty[T]A sequence of one.
- prepend
&Std.NonEmpty.NonEmpty[T] -> T -> Std.NonEmpty.NonEmpty[T]An element added to the front.
- reduce
&Std.NonEmpty.NonEmpty[T] -> fn(T, T) -> T -> TThe elements combined from the left, starting from the first one.
- rest
&Std.NonEmpty.NonEmpty[T] -> Array[T]Everything after the first element, which may be empty.
- reversed
&Std.NonEmpty.NonEmpty[T] -> Std.NonEmpty.NonEmpty[T]The elements in the opposite order.
- sortBy
&Std.NonEmpty.NonEmpty[T] -> fn(T, T) -> Bool -> Std.NonEmpty.NonEmpty[T]The elements in order under an ordering of your own.
- sorted
&Std.NonEmpty.NonEmpty[T] -> Std.NonEmpty.NonEmpty[T] where T: OrdThe elements in order.
- toArray
&Std.NonEmpty.NonEmpty[T] -> Array[T]Every element, as an ordinary array.
