Cons

zio.prelude.NonEmptyList.Cons
final case class Cons[+A](head: A, tail: NonEmptyList[A]) extends NonEmptyList[A]

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait NonEmptyList[A]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

final def ++[A1 >: A](that: Iterable[A1]): NonEmptyList[A1]

Concatenates this NonEmptyList with the specified Iterable.

Concatenates this NonEmptyList with the specified Iterable.

Attributes

Inherited from:
NonEmptyList
final def ++[A1 >: A](that: NonEmptyList[A1]): NonEmptyList[A1]

Concatenates this NonEmptyList with the specified NonEmptyList.

Concatenates this NonEmptyList with the specified NonEmptyList.

Attributes

Inherited from:
NonEmptyList
final def ::[A1 >: A](a: A1): NonEmptyList[A1]

Prepends the specified value to this NonEmptyList.

Prepends the specified value to this NonEmptyList.

Attributes

Inherited from:
NonEmptyList
final def contains[A1 >: A](a: A1)(implicit A: Equal[A1]): Boolean

Returns whether this NonEmptyList contains the specified element.

Returns whether this NonEmptyList contains the specified element.

Attributes

Inherited from:
NonEmptyList
final def corresponds[B](that: NonEmptyList[B])(f: (A, B) => Boolean): Boolean

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

Inherited from:
NonEmptyList
final def count(f: A => Boolean): Int

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

Inherited from:
NonEmptyList
final def distinct: NonEmptyList[A]

Removes duplicate elements from this NonEmptyList.

Removes duplicate elements from this NonEmptyList.

Attributes

Inherited from:
NonEmptyList
final def drop(n: Int): List[A]

Drops the first n elements from this NonEmptyList returning a List.

Drops the first n elements from this NonEmptyList returning a List.

Attributes

Inherited from:
NonEmptyList
final def dropRight(n: Int): List[A]

Drops the last n elements from this NonEmptyList returning a List.

Drops the last n elements from this NonEmptyList returning a List.

Attributes

Inherited from:
NonEmptyList
final def dropWhile(f: A => Boolean): List[A]

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

Inherited from:
NonEmptyList
final override def equals(that: Any): Boolean

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
NonEmptyList -> Any
Inherited from:
NonEmptyList
final def exists(f: A => Boolean): Boolean

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

Inherited from:
NonEmptyList
final def find(f: A => Boolean): Option[A]

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

Inherited from:
NonEmptyList
final def flatMap[B](f: A => NonEmptyList[B]): NonEmptyList[B]

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

Inherited from:
NonEmptyList
final def flatten[B](implicit ev: A <:< NonEmptyList[B]): NonEmptyList[B]

Flattens a NonEmptyList of NonEmptyList values into a single NonEmptyList.

Flattens a NonEmptyList of NonEmptyList values into a single NonEmptyList.

Attributes

Inherited from:
NonEmptyList
final def foldLeft[B](z: B)(f: (B, A) => B): B

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

Inherited from:
NonEmptyList
final def foldRight[B](z: B)(op: (A, B) => B): B

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

Inherited from:
NonEmptyList
final def forEach[F[_] : Covariant, B](f: A => F[B]): F[NonEmptyList[B]]

Transforms each element of this NonEmptyList with the specified effectual function.

Transforms each element of this NonEmptyList with the specified effectual function.

Attributes

Inherited from:
NonEmptyList
final def forall(f: A => Boolean): Boolean

Returns whether all elements of this NonEmptyList satisfy the specified predicate.

Returns whether all elements of this NonEmptyList satisfy the specified predicate.

Attributes

Inherited from:
NonEmptyList
final override def hashCode: Int

Returns the hashCode of this NonEmptyList.

Returns the hashCode of this NonEmptyList.

Attributes

Definition Classes
NonEmptyList -> Any
Inherited from:
NonEmptyList
final def length: Int

Returns the length of this NonEmptyList.

Returns the length of this NonEmptyList.

Attributes

Inherited from:
NonEmptyList
final def map[B](f: A => B): NonEmptyList[B]

Transforms the elements of this NonEmptyList with the specified function.

Transforms the elements of this NonEmptyList with the specified function.

Attributes

Inherited from:
NonEmptyList
final def mapZIO[R, E, B](f: A => ZIO[R, E, B]): ZIO[R, E, NonEmptyList[B]]

Effectfully maps the elements of this NonEmptyList.

Effectfully maps the elements of this NonEmptyList.

Attributes

Inherited from:
NonEmptyList
final def mapZIOPar[R, E, B](f: A => ZIO[R, E, B]): ZIO[R, E, NonEmptyList[B]]

Effectfully maps the elements of this NonEmptyList in parallel.

Effectfully maps the elements of this NonEmptyList in parallel.

Attributes

Inherited from:
NonEmptyList
final def max(implicit A: Ord[A]): A

Returns the maximum element in this NonEmptyList.

Returns the maximum element in this NonEmptyList.

Attributes

Inherited from:
NonEmptyList
final def maxBy[B](f: A => B)(implicit B: Ord[B]): A

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

Inherited from:
NonEmptyList
final def min(implicit A: Ord[A]): A

Returns the minimum element in this NonEmptyList.

Returns the minimum element in this NonEmptyList.

Attributes

Inherited from:
NonEmptyList
final def minBy[B](f: A => B)(implicit B: Ord[B]): A

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

Inherited from:
NonEmptyList

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

Inherited from:
NonEmptyList
final def mkString(sep: String): 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

Inherited from:
NonEmptyList
final def mkString: String

Renders the elements of this NonEmptyList as a String.

Renders the elements of this NonEmptyList as a String.

Attributes

Inherited from:
NonEmptyList
final def peel: (A, List[A])

Decomposes the NonEmptyList into an element and a (possibly empty) List

Decomposes the NonEmptyList into an element and a (possibly empty) List

Attributes

Inherited from:
NonEmptyList
final def peelNonEmpty: (A, Option[NonEmptyList[A]])

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

Inherited from:
NonEmptyList
final def product[A1 >: A](implicit A: Associative[subtypeF.Type[A1]]): A1

Returns the product of the elements of this NonEmptyList.

Returns the product of the elements of this NonEmptyList.

Attributes

Inherited from:
NonEmptyList

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product
final def reduce[A1 >: A](implicit A: Associative[A1]): A1

Reduces the elements of this NonEmptyList using the specified associative operator.

Reduces the elements of this NonEmptyList using the specified associative operator.

Attributes

Inherited from:
NonEmptyList
final def reduceLeft[A1 >: A](f: (A1, A1) => A1): A1

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

Inherited from:
NonEmptyList
final def reduceMap[B](f: A => B)(implicit B: Associative[B]): B

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

Inherited from:
NonEmptyList
final def reduceMapLeft[B](map: A => B)(reduce: (B, A) => B): B

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

Inherited from:
NonEmptyList
final def reduceMapRight[B](map: A => B)(reduce: (A, B) => B): B

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

Inherited from:
NonEmptyList
final def reduceRight[A1 >: A](f: (A1, A1) => A1): A1

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

Inherited from:
NonEmptyList
final def reverse: NonEmptyList[A]

Reverses the order of elements in this NonEmptyList.

Reverses the order of elements in this NonEmptyList.

Attributes

Inherited from:
NonEmptyList
final def sum[A1 >: A](implicit A: Associative[subtypeF.Type[A1]]): A1

Returns the sum of the elements of this NonEmptyList.

Returns the sum of the elements of this NonEmptyList.

Attributes

Inherited from:
NonEmptyList

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

Inherited from:
NonEmptyList

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

Inherited from:
NonEmptyList
final def take(n: Int): List[A]

Takes the first n elements from this NonEmptyList returning a List.

Takes the first n elements from this NonEmptyList returning a List.

Attributes

Inherited from:
NonEmptyList
final def takeRight(n: Int): List[A]

Takes the last n elements from this NonEmptyList returning a List.

Takes the last n elements from this NonEmptyList returning a List.

Attributes

Inherited from:
NonEmptyList
final def takeWhile(f: A => Boolean): List[A]

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

Inherited from:
NonEmptyList
final def toCons[A1 >: A]: ::[A1]

Converts this NonEmptyList to the :: case of a List.

Converts this NonEmptyList to the :: case of a List.

Attributes

Inherited from:
NonEmptyList

Converts this NonEmptyList to a NonEmptyChunk.

Converts this NonEmptyList to a NonEmptyChunk.

Attributes

Inherited from:
NonEmptyList
final override def toString: String

Renders this NonEmptyList as a String.

Renders this NonEmptyList as a String.

Attributes

Definition Classes
NonEmptyList -> Any
Inherited from:
NonEmptyList
final def zip[B](that: NonEmptyList[B]): NonEmptyList[(A, B)]

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

Inherited from:
NonEmptyList
final def zipWith[B, C](that: NonEmptyList[B])(f: (A, B) => C): NonEmptyList[C]

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

Inherited from:
NonEmptyList
final def zipWithIndex: NonEmptyList[(A, Int)]

Annotates each element of this NonEmptyList with its index.

Annotates each element of this NonEmptyList with its index.

Attributes

Inherited from:
NonEmptyList