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