NonEmptyList

libretto.lambda.util.NonEmptyList
See theNonEmptyList companion object
opaque case class NonEmptyList[+A](head: A, tail: List[A])

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Type members

Types

opaque type TraverseBuilder[F[_]]

Value members

Concrete methods

def ++[A0 >: A](that: NonEmptyList[A0]): NonEmptyList[A0]
def :+[A0 >: A](last: A0): NonEmptyList[A0]
def ::[A0 >: A](a0: A0): NonEmptyList[A0]
def flatMap[B](f: A => NonEmptyList[B]): NonEmptyList[B]
def map[B](f: A => B): NonEmptyList[B]
def toList: List[A]
def traverse[F[_], B](f: A => F[B])(using F: Applicative[F]): F[NonEmptyList[B]]
def traverse[F[_]]: TraverseBuilder[F]

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Extensions

Extensions

extension [F[_]](bf: TraverseBuilder[F])
def apply[B](f: A => F[B])(using Applicative[F]): F[NonEmptyList[B]]