given_Foldable_List

Value members

Concrete methods

def foldLeft[A, B](fa: List[A], z: B)(f: (B, A) => B): B
def foldMap[A, B](fa: List[A])(f: A => B)(using F: Monoid[B]): B
def foldRight[A, B](fa: List[A], z: => B)(f: (A, => B) => B): B

Inherited methods

def all[A](fa: List[A])(p: A => Boolean): Boolean

Whether all As in fa yield true from p.

Whether all As in fa yield true from p.

Inherited from
Foldable
def allM[G[_], A](fa: List[A])(p: A => G[Boolean])(using G: Monad[G]): G[Boolean]

all with monadic traversal.

all with monadic traversal.

Inherited from
Foldable
def any[A](fa: List[A])(p: A => Boolean): Boolean

Whether any As in fa yield true from p.

Whether any As in fa yield true from p.

Inherited from
Foldable
def anyM[G[_], A](fa: List[A])(p: A => G[Boolean])(using G: Monad[G]): G[Boolean]

any with monadic traversal.

any with monadic traversal.

Inherited from
Foldable
final
def count[A](fa: List[A]): Int

Alias for length.

Alias for length.

Inherited from
Foldable
def empty[A](fa: List[A]): Boolean

Deforested alias for toStream(fa).isEmpty.

Deforested alias for toStream(fa).isEmpty.

Inherited from
Foldable
def findLeft[A](fa: List[A])(f: A => Boolean): Option[A]
Inherited from
Foldable
def findRight[A](fa: List[A])(f: A => Boolean): Option[A]
Inherited from
Foldable
def fold[M](t: List[M])(using evidence$1: Monoid[M]): M

Combine the elements of a structure using a monoid.

Combine the elements of a structure using a monoid.

Inherited from
Foldable
def foldLeftM[G[_], A, B](fa: List[A], z: B)(f: (B, A) => G[B])(using M: Monad[G]): G[B]

Left-associative, monadic fold of a structure.

Left-associative, monadic fold of a structure.

Inherited from
Foldable
def foldMapM[G[_], A, B](fa: List[A])(f: A => G[B])(using B: Monoid[B], G: Monad[G]): G[B]

Specialization of foldRightM when B has a Monoid.

Specialization of foldRightM when B has a Monoid.

Inherited from
Foldable
def foldRightM[G[_], A, B](fa: List[A], z: => B)(f: (A, => B) => G[B])(using M: Monad[G]): G[B]

Right-associative, monadic fold of a structure.

Right-associative, monadic fold of a structure.

Inherited from
Foldable
def index[A](fa: List[A], i: Int): Option[A]
Returns

the element at index i in a Some, or None if the given index falls outside of the range

Inherited from
Foldable
def indexOr[A](fa: List[A], default: => A, i: Int): A
Returns

the element at index i, or default if the given index falls outside of the range

Inherited from
Foldable
def intercalate[A](fa: List[A], a: A)(using A: Monoid[A]): A

Insert an A between every A, yielding the sum.

Insert an A between every A, yielding the sum.

Inherited from
Foldable
def length[A](fa: List[A]): Int

Deforested alias for toStream(fa).size.

Deforested alias for toStream(fa).size.

Inherited from
Foldable
def sequence_[M[_], A](fa: List[M[A]])(using a: Applicative[M]): M[Unit]

Strict sequencing in an applicative functor M that ignores the value in fa.

Strict sequencing in an applicative functor M that ignores the value in fa.

Inherited from
Foldable
def suml[A](fa: List[A])(using A: Monoid[A]): A
Inherited from
Foldable
def sumr[A](fa: List[A])(using A: Monoid[A]): A
Inherited from
Foldable
def toList[A](fa: List[A]): List[A]
Inherited from
Foldable
def toSet[A](fa: List[A]): Set[A]
Inherited from
Foldable
def toStream[A](fa: List[A]): LazyList[A]
Inherited from
Foldable
def toVector[A](fa: List[A]): Vector[A]
Inherited from
Foldable
def traverse_[M[_], A, B](fa: List[A])(f: A => M[B])(using a: Applicative[M]): M[Unit]

Strict traversal in an applicative functor M that ignores the result of f.

Strict traversal in an applicative functor M that ignores the result of f.

Inherited from
Foldable