List

scalus.prelude.List
See theList companion enum
object List

Attributes

Companion
enum
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
List.type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def all[A, B](lst: List[A])(f: A => Boolean): Boolean
def append[A](lst1: List[A], lst2: List[A]): List[A]
def apply[A](args: A*): List[A]
def cons[A](head: A, tail: List[A]): List[A]

Adds an element at the beginning of this list

Adds an element at the beginning of this list

Attributes

inline def empty[A]: List[A]
def exists[A](lst: List[A])(p: A => Boolean): Boolean
def filter[A](lst: List[A])(p: A => Boolean): List[A]
def find[A](lst: List[A])(p: A => Boolean): Maybe[A]
def findOrFail[A](lst: List[A])(p: A => Boolean): A
def foldLeft[A, B](lst: List[A], z: B)(f: (B, A) => B): B
def from[A](i: IterableOnce[A]): List[A]
def from[A](i: Iterable[A]): List[A]
def getByIndex[A](lst: List[A])(idx: BigInt): A
def isEmpty[A](lst: List[A]): Boolean
def length[A](lst: List[A]): BigInt

Returns the length of the list

Returns the length of the list

Attributes

def map[A, B](lst: List[A])(f: A => B): List[B]
def map2[A, B, C](a: List[A], b: List[B])(f: (A, B) => C): List[C]
def single[A](a: A): List[A]

Creates a list with a single element

Creates a list with a single element

Attributes

Extensions

Extensions

extension [A](lst: List[A])
inline def !!(idx: BigInt): A