NonEmptyList

zio.prelude.NonEmptyList
See theNonEmptyList companion trait

Attributes

Companion
trait
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, tail: NonEmptyList[A]) extends NonEmptyList[A]

Attributes

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

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

Inherited types

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

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

Constructs a NonEmptyList with the specified head and tail.

Constructs a NonEmptyList with the specified head and tail.

Attributes

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

Constructs a NonEmptyList from an element and Iterable.

Constructs a NonEmptyList from an element and Iterable.

Attributes

Constructs a NonEmptyList from an Iterable or None otherwise.

Constructs a NonEmptyList from an Iterable or None otherwise.

Attributes

Constructs a NonEmptyList from a NonEmptyChunk.

Constructs a NonEmptyList from a NonEmptyChunk.

Attributes

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

def single[A](head: A): NonEmptyList[A]

Constructs a NonEmptyList with the specified single value.

Constructs a NonEmptyList with the specified single value.

Attributes

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

Implicits

Implicits

The Associative instance for NonEmptyList.

The Associative instance for NonEmptyList.

Attributes

The AssociativeEither instance for NonEmptyList.

The AssociativeEither instance for NonEmptyList.

Attributes

The Covariant instance for NonEmptyList.

The Covariant instance for NonEmptyList.

Attributes

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

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

Attributes

The DeriveEqual instance for NonEmptyList.

The DeriveEqual instance for NonEmptyList.

Attributes

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

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

Attributes

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

The IdentityBoth (and thus AssociativeBoth) instance for NonEmptyList.

The IdentityBoth (and thus AssociativeBoth) instance for NonEmptyList.

Attributes

The IdentityFlatten instance for NonEmptyList.

The IdentityFlatten instance for NonEmptyList.

Attributes

The NonEmptyForEach instance for NonEmptyList.

The NonEmptyForEach instance for NonEmptyList.

Attributes

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

Inherited implicits

The CommutativeBoth instance for NonEmptyList.

The CommutativeBoth instance for NonEmptyList.

Attributes

Inherited from:
LowPriorityNonEmptyListImplicits
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

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

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

Attributes

Inherited from:
LowPriorityNonEmptyListImplicits