← ZIO Prelude docs

NonEmptyList

zio.prelude.NonEmptyList
See theNonEmptyList companion trait

Attributes

Companion
trait
Source
NonEmptyList.scala
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Show all
Self type

Members list

Type members

Classlikes

final case class Cons[+A](head: A, tail0: NonEmptyList[A]) extends NonEmptyList[A]

Attributes

Source
NonEmptyList.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait NonEmptyList[A]
class Object
trait Matchable
class Any
Show all
final case class Single[+A](head: A) extends NonEmptyList[A]

Attributes

Source
NonEmptyList.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait NonEmptyList[A]
class Object
trait Matchable
class Any
Show all

Inherited and Abstract types

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
Source
Mirror.scala

The name of the type

The name of the type

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Concrete methods

def apply[A](head: A, tail: A*): NonEmptyList[A]

Constructs a NonEmptyList from one or more values.

Constructs a NonEmptyList from one or more values.

Attributes

Source
NonEmptyList.scala
def cons[A](head: A, tail: NonEmptyList[A]): NonEmptyList[A]

Constructs a NonEmptyList with the specified head and tail.

Constructs a NonEmptyList with the specified head and tail.

Attributes

Source
NonEmptyList.scala
def fromCons[A](cons: ::[A]): NonEmptyList[A]

Constructs a NonEmptyList from the :: case of a List.

Constructs a NonEmptyList from the :: case of a List.

Attributes

Source
NonEmptyList.scala
def fromIterable[A](head: A, tail: Iterable[A]): NonEmptyList[A]

Constructs a NonEmptyList from an element and Iterable.

Constructs a NonEmptyList from an element and Iterable.

Attributes

Source
NonEmptyList.scala
def fromIterableOption[A](iterable: Iterable[A]): Option[NonEmptyList[A]]

Constructs a NonEmptyList from an Iterable or None otherwise.

Constructs a NonEmptyList from an Iterable or None otherwise.

Attributes

Source
NonEmptyList.scala
def fromNonEmptyChunk[A](nonEmptyChunk: NonEmptyChunk[A]): NonEmptyList[A]

Constructs a NonEmptyList from a NonEmptyChunk.

Constructs a NonEmptyList from a NonEmptyChunk.

Attributes

Source
NonEmptyList.scala
def iterate[A](start: A)(iterate: A => Option[A]): NonEmptyList[A]

Constructs a NonEmptyList from an initial state start by repeatedly applying iterate as long as it returns Some.

Constructs a NonEmptyList from an initial state start by repeatedly applying iterate as long as it returns Some.

Attributes

Source
NonEmptyList.scala
def single[A](head: A): NonEmptyList[A]

Constructs a NonEmptyList with the specified single value.

Constructs a NonEmptyList with the specified single value.

Attributes

Source
NonEmptyList.scala
def unfold[S, A](start: S)(project: S => A)(iterate: S => Option[S]): NonEmptyList[A]

Constructs a NonEmptyList from an initial state start by repeatedly applying iterate as long as it returns Some, using the function project to map each S value to an A value.

Constructs a NonEmptyList from an initial state start by repeatedly applying iterate as long as it returns Some, using the function project to map each S value to an A value.

Attributes

Source
NonEmptyList.scala

Implicits

Implicits

The Associative instance for NonEmptyList.

The Associative instance for NonEmptyList.

Attributes

Source
NonEmptyList.scala

The AssociativeEither instance for NonEmptyList.

The AssociativeEither instance for NonEmptyList.

Attributes

Source
NonEmptyList.scala

The Covariant instance for NonEmptyList.

The Covariant instance for NonEmptyList.

Attributes

Source
NonEmptyList.scala
implicit def NonEmptyListDebug[A : Debug]: Debug[NonEmptyList[A]]

Derives a Debug[NonEmptyList[A]] given a Debug[A].

Derives a Debug[NonEmptyList[A]] given a Debug[A].

Attributes

Source
NonEmptyList.scala

The DeriveEqual instance for NonEmptyList.

The DeriveEqual instance for NonEmptyList.

Attributes

Source
NonEmptyList.scala
implicit def NonEmptyListEqual[A : Equal]: Equal[NonEmptyList[A]]

Derives an Equal[NonEmptyList[A]] given an Equal[A].

Derives an Equal[NonEmptyList[A]] given an Equal[A].

Attributes

Source
NonEmptyList.scala
implicit def NonEmptyListHash[A : Hash]: Hash[NonEmptyList[A]]

Derives a Hash[NonEmptyList[A]] given a Hash[A].

Derives a Hash[NonEmptyList[A]] given a Hash[A].

Attributes

Source
NonEmptyList.scala

The IdentityBoth (and thus AssociativeBoth) instance for NonEmptyList.

The IdentityBoth (and thus AssociativeBoth) instance for NonEmptyList.

Attributes

Source
NonEmptyList.scala

The IdentityFlatten instance for NonEmptyList.

The IdentityFlatten instance for NonEmptyList.

Attributes

Source
NonEmptyList.scala

The NonEmptyForEach instance for NonEmptyList.

The NonEmptyForEach instance for NonEmptyList.

Attributes

Source
NonEmptyList.scala
implicit def toCons[A](nonEmptyList: NonEmptyList[A]): ::[A]

Provides an implicit conversion from NonEmptyList to the :: case of List for interoperability with Scala's collection library.

Provides an implicit conversion from NonEmptyList to the :: case of List for interoperability with Scala's collection library.

Attributes

Source
NonEmptyList.scala

Inherited implicits

The CommutativeBoth instance for NonEmptyList.

The CommutativeBoth instance for NonEmptyList.

Attributes

Inherited from:
LowPriorityNonEmptyListImplicits
Source
NonEmptyList.scala
implicit def NonEmptyListOrd[A : Ord]: Ord[NonEmptyList[A]]

Derives an Ord[NonEmptyList[A]] given an Ord[A].

Derives an Ord[NonEmptyList[A]] given an Ord[A].

Attributes

Inherited from:
LowPriorityNonEmptyListImplicits
Source
NonEmptyList.scala

Derives a PartialOrd[NonEmptyList[A]] given a PartialOrd[A].

Derives a PartialOrd[NonEmptyList[A]] given a PartialOrd[A].

Attributes

Inherited from:
LowPriorityNonEmptyListImplicits
Source
NonEmptyList.scala