A NonEmptyList[A] is a list of one or more values of type A. Unlike a List, a NonEmptyList is guaranteed to contain at least one element. This additional structure allows some operations to be defined on NonEmptyList that are not safe on List, such as head and reduceAll.
For interoperability with Scala's collection library an implicit conversion is provided from NonEmptyList to the :: case of List. Operations that cannot preserve the guarantee that the resulting collection must have at least one element will return a List instead.
Attributes
- Companion
- object
- Source
- NonEmptyList.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
- Self type
-
NonEmptyList[A]
Members list
Value members
Abstract methods
Returns the head of this NonEmptyList.
Concrete methods
Concatenates this NonEmptyList with the specified NonEmptyList.
Concatenates this NonEmptyList with the specified NonEmptyList.
Attributes
- Source
- NonEmptyList.scala
Concatenates this NonEmptyList with the specified Iterable.
Prepends the specified value to this NonEmptyList.
Prepends the specified value to this NonEmptyList.
Prepends the specified value to this NonEmptyList.
Attributes
- Definition Classes
- Source
- NonEmptyList.scala
Collects all elements of this NonEmptyList that match the specified partial function.
Collects all elements of this NonEmptyList that match the specified partial function.
Attributes
- Definition Classes
- Source
- NonEmptyList.scala
Selects the first element of this NonEmptyList that matches the specified partial function.
Selects the first element of this NonEmptyList that matches the specified partial function.
Attributes
- Definition Classes
- Source
- NonEmptyList.scala
Returns whether this NonEmptyList contains the specified element.
Returns whether this NonEmptyList contains the specified element.
Attributes
- Source
- NonEmptyList.scala
Determines whether this NonEmptyList and the specified NonEmptyList have the same length and every pair of corresponding elements of this NonEmptyList and the specified NonEmptyList satisfy the specified predicate.
Determines whether this NonEmptyList and the specified NonEmptyList have the same length and every pair of corresponding elements of this NonEmptyList and the specified NonEmptyList satisfy the specified predicate.
Attributes
- Source
- NonEmptyList.scala
Returns the number of elements in this NonEmptyList that satisfy the specified predicate.
Returns the number of elements in this NonEmptyList that satisfy the specified predicate.
Attributes
- Source
- NonEmptyList.scala
Removes duplicate elements from this NonEmptyList.
Drops the first n elements from this NonEmptyList returning a List.
Drops the first n elements from this NonEmptyList returning a List.
Attributes
- Source
- NonEmptyList.scala
Drops the last n elements from this NonEmptyList returning a List.
Drops the last n elements from this NonEmptyList returning a List.
Attributes
- Source
- NonEmptyList.scala
Drops elements from the start of this NonEmptyList that satisfy the specified predicate returning a List.
Drops elements from the start of this NonEmptyList that satisfy the specified predicate returning a List.
Attributes
- Source
- NonEmptyList.scala
Returns whether this NonEmptyList and the specified NonEmptyList are equal to each other.
Returns whether this NonEmptyList and the specified NonEmptyList are equal to each other.
Attributes
- Definition Classes
-
Any
- Source
- NonEmptyList.scala
Returns whether an element exists in this NonEmptyList satisfying the specified predicate.
Returns whether an element exists in this NonEmptyList satisfying the specified predicate.
Attributes
- Source
- NonEmptyList.scala
Filters elements of this NonEmptyList that satisfy the specified predicate.
Filters elements of this NonEmptyList that satisfy the specified predicate.
Attributes
- Definition Classes
- Source
- NonEmptyList.scala
Filters elements of this NonEmptyList that satisfy the specified predicate.
Filters elements of this NonEmptyList that satisfy the specified predicate.
Attributes
- Definition Classes
- Source
- NonEmptyList.scala
Returns the first element in this NonEmptyList satisfying the specified predicate or None otherwise.
Returns the first element in this NonEmptyList satisfying the specified predicate or None otherwise.
Attributes
- Source
- NonEmptyList.scala
Transforms each element of this NonEmptyList to a NonEmptyList and combines them into a single NonEmptyList.
Transforms each element of this NonEmptyList to a NonEmptyList and combines them into a single NonEmptyList.
Attributes
- Source
- NonEmptyList.scala
Flattens a NonEmptyList of NonEmptyList values into a single NonEmptyList.
Flattens a NonEmptyList of NonEmptyList values into a single NonEmptyList.
Attributes
- Source
- NonEmptyList.scala
Folds over the elements of this NonEmptyList from left to right using the specified initial value and combining function
Folds over the elements of this NonEmptyList from left to right using the specified initial value and combining function
Attributes
- Source
- NonEmptyList.scala
Folds over the elements of this NonEmptyList from right to left using the specified initial value and combining function.
Folds over the elements of this NonEmptyList from right to left using the specified initial value and combining function.
Attributes
- Source
- NonEmptyList.scala
Transforms each element of this NonEmptyList with the specified effectual function.
Transforms each element of this NonEmptyList with the specified effectual function.
Attributes
- Source
- NonEmptyList.scala
Returns whether all elements of this NonEmptyList satisfy the specified predicate.
Returns whether all elements of this NonEmptyList satisfy the specified predicate.
Attributes
- Source
- NonEmptyList.scala
Groups elements of this NonEmptyList into an Iterator of NonEmptyLists of the specified size. The last group may be smaller than the specified size.
Groups elements of this NonEmptyList into an Iterator of NonEmptyLists of the specified size. The last group may be smaller than the specified size.
Attributes
- Definition Classes
- Source
- NonEmptyList.scala
Returns the hashCode of this NonEmptyList.
Returns the hashCode of this NonEmptyList.
Attributes
- Definition Classes
-
Any
- Source
- NonEmptyList.scala
Attributes
- Definition Classes
- Source
- NonEmptyList.scala
Iterates over the elements of this NonEmptyList.
Iterates over the elements of this NonEmptyList.
Attributes
- Definition Classes
- Source
- NonEmptyList.scala
Returns the last element in this NonEmptyList.
Returns the last element in this NonEmptyList.
Attributes
- Definition Classes
- Source
- NonEmptyList.scala
Returns the length of this NonEmptyList.
Transforms the elements of this NonEmptyList with the specified function.
Transforms the elements of this NonEmptyList with the specified function.
Attributes
- Source
- NonEmptyList.scala
Effectfully maps the elements of this NonEmptyList.
Effectfully maps the elements of this NonEmptyList in parallel.
Effectfully maps the elements of this NonEmptyList in parallel.
Attributes
- Source
- NonEmptyList.scala
Returns the maximum element in this NonEmptyList.
Returns the maximum element in this NonEmptyList using the specified function to map values of type A to values of type B that an ordering is defined on.
Returns the maximum element in this NonEmptyList using the specified function to map values of type A to values of type B that an ordering is defined on.
Attributes
- Source
- NonEmptyList.scala
Returns the minimum element in this NonEmptyList.
Returns the minimum element in this NonEmptyList using the specified function to map values of type A to values of type B that an ordering is defined on.
Returns the minimum element in this NonEmptyList using the specified function to map values of type A to values of type B that an ordering is defined on.
Attributes
- Source
- NonEmptyList.scala
Renders the elements of this NonEmptyList as a String.
Renders the elements of this NonEmptyList as a String using the specified separator.
Renders the elements of this NonEmptyList as a String using the specified separator.
Attributes
- Source
- NonEmptyList.scala
Renders the elements of this NonEmptyList as a String using the specified separator and start and end values.
Renders the elements of this NonEmptyList as a String using the specified separator and start and end values.
Attributes
- Source
- NonEmptyList.scala
Decomposes the NonEmptyList into an element and a (possibly empty) List
Decomposes the NonEmptyList into an element and a (possibly empty) List
Attributes
- Source
- NonEmptyList.scala
Returns an element of this NonEmptyList and the remainder or None, if the remainder is empty.
Returns an element of this NonEmptyList and the remainder or None, if the remainder is empty.
Attributes
- Source
- NonEmptyList.scala
Prepends the specified value to this NonEmptyList.
Prepends the specified value to this NonEmptyList.
Attributes
- Definition Classes
- Source
- NonEmptyList.scala
Returns the product of the elements of this NonEmptyList.
Reduces the elements of this NonEmptyList using the specified associative operator.
Reduces the elements of this NonEmptyList using the specified associative operator.
Attributes
- Source
- NonEmptyList.scala
Reduces the elements of this NonEmptyList from left to right using the specified function.
Reduces the elements of this NonEmptyList from left to right using the specified function.
Attributes
- Definition Classes
- Source
- NonEmptyList.scala
Reduces the elements of this NonEmptyList from left to right using the specified function.
Reduces the elements of this NonEmptyList from left to right using the specified function.
Attributes
- Source
- NonEmptyList.scala
Maps each element of this NonEmptyList to a type B that has an associative operation then combines them all with the associative operation.
Maps each element of this NonEmptyList to a type B that has an associative operation then combines them all with the associative operation.
Attributes
- Source
- NonEmptyList.scala
Reduces the elements of this NonEmptyList from left to right using the function map to transform the first value to the type B and then the function reduceAll to combine the B value with each other A value.
Reduces the elements of this NonEmptyList from left to right using the function map to transform the first value to the type B and then the function reduceAll to combine the B value with each other A value.
Attributes
- Source
- NonEmptyList.scala
Reduces the elements of this NonEmptyList from right to left using the function map to transform the first value to the type B and then the function reduceAll to combine the B value with each other A value.
Reduces the elements of this NonEmptyList from right to left using the function map to transform the first value to the type B and then the function reduceAll to combine the B value with each other A value.
Attributes
- Source
- NonEmptyList.scala
Reduces the elements of this NonEmptyList from right to left using the specified function.
Reduces the elements of this NonEmptyList from right to left using the specified function.
Attributes
- Source
- NonEmptyList.scala
Reverses the order of elements in this NonEmptyList.
Attributes
- Definition Classes
- Source
- NonEmptyList.scala
Attributes
- Definition Classes
- Source
- NonEmptyList.scala
Returns the sum of the elements of this NonEmptyList.
Attributes
- Definition Classes
- Source
- NonEmptyList.scala
Returns the tail of this NonEmptyList if it exists or None otherwise.
Returns the tail of this NonEmptyList if it exists or None otherwise.
Attributes
- Source
- NonEmptyList.scala
Returns a new NonEmptyList composed of this NonEmptyList followed by each of its tails, ending with a singleton NonEmptyList.
Returns a new NonEmptyList composed of this NonEmptyList followed by each of its tails, ending with a singleton NonEmptyList.
Attributes
- Source
- NonEmptyList.scala
Takes the first n elements from this NonEmptyList returning a List.
Takes the first n elements from this NonEmptyList returning a List.
Attributes
- Source
- NonEmptyList.scala
Takes the last n elements from this NonEmptyList returning a List.
Takes the last n elements from this NonEmptyList returning a List.
Attributes
- Source
- NonEmptyList.scala
Takes elements from the start of this NonEmptyList that satisfy the specified predicate returning a List.
Takes elements from the start of this NonEmptyList that satisfy the specified predicate returning a List.
Attributes
- Source
- NonEmptyList.scala
Attributes
- Definition Classes
- Source
- NonEmptyList.scala
Converts this NonEmptyList to the :: case of a List.
Attributes
- Definition Classes
- Source
- NonEmptyList.scala
Attributes
- Definition Classes
- Source
- NonEmptyList.scala
Converts this NonEmptyList to a NonEmptyChunk.
Renders this NonEmptyList as a String.
Zips this NonEmptyList together with the specified NonEmptyList, returning a new NonEmptyList with a length equal to the minimum of the two and elements combined pairwise.
Zips this NonEmptyList together with the specified NonEmptyList, returning a new NonEmptyList with a length equal to the minimum of the two and elements combined pairwise.
Attributes
- Definition Classes
- Source
- NonEmptyList.scala
Zips this NonEmptyList together with the specified NonEmptyList, returning a new NonEmptyList with a length equal to the minimum of the two and elements combined pairwise using the specified function.
Zips this NonEmptyList together with the specified NonEmptyList, returning a new NonEmptyList with a length equal to the minimum of the two and elements combined pairwise using the specified function.
Attributes
- Source
- NonEmptyList.scala
Annotates each element of this NonEmptyList with its index.
Annotates each element of this NonEmptyList with its index.
Attributes
- Definition Classes
- Source
- NonEmptyList.scala
Inherited methods
Attributes
- Inherited from:
- NonEmptyOps
- Source
- NonEmptyOps.scala