list

object list extends ListInstances with ListFunctions
class Object
trait Matchable
class Any

Type members

Classlikes

object listSyntax extends ToListOps

Value members

Inherited methods

final
def <^>[A, B : Monoid](as: List[A])(f: NonEmptyList[A] => B): B

Returns f applied to the contents of as if non-empty, otherwise, the zero element of the Monoid for the type B.

Returns f applied to the contents of as if non-empty, otherwise, the zero element of the Monoid for the type B.

Inherited from
ListFunctions
final
def adjacentPairs[A](as: List[A]): List[(A, A)]

[(as(0), as(1)), (as(1), as(2)), ... (as(size-2), as(size-1))]

[(as(0), as(1)), (as(1), as(2)), ... (as(size-2), as(size-1))]

Inherited from
ListFunctions
final
def allPairs[A](as: List[A]): List[(A, A)]

Combinations of as and as, excluding same-element pairs.

Combinations of as and as, excluding same-element pairs.

Inherited from
ListFunctions
final
def breakM[A, M[_] : Monad](as: List[A])(p: A => M[Boolean]): M[(List[A], List[A])]

spanM with p's complement.

spanM with p's complement.

Inherited from
ListFunctions
final
def filterM[A, M[_] : Applicative](as: List[A])(p: A => M[Boolean]): M[List[A]]
Inherited from
ListFunctions
final
def findM[A, M[_] : Monad](as: List[A])(p: A => M[Boolean]): M[Maybe[A]]

Run p(a)s left-to-right until it yields a true value, answering Maybe.Just(that), or Maybe.empty if nothing matched p.

Run p(a)s left-to-right until it yields a true value, answering Maybe.Just(that), or Maybe.empty if nothing matched p.

Inherited from
ListFunctions
final
def groupBy1[A, B](as: List[A])(f: A => B): Map[B, NonEmptyList[A]]

As with the standard library groupBy but preserving the fact that the values in the Map must be non-empty

As with the standard library groupBy but preserving the fact that the values in the Map must be non-empty

Inherited from
ListFunctions
final
def groupWhen[A](as: List[A])(p: (A, A) => Boolean): List[NonEmptyList[A]]

groupWhenM specialized to scalaz.Id.Id.

groupWhenM specialized to scalaz.Id.Id.

Inherited from
ListFunctions
final
def groupWhenM[A, M[_] : Monad](as: List[A])(p: (A, A) => M[Boolean]): M[List[NonEmptyList[A]]]

Split at each point where p(as(n), as(n+1)) yields false.

Split at each point where p(as(n), as(n+1)) yields false.

Inherited from
ListFunctions
final
def initz[A](as: List[A]): List[List[A]]

[Nil, as take 1, as take 2, ..., as]

[Nil, as take 1, as take 2, ..., as]

Inherited from
ListFunctions
final
def intersperse[A](as: List[A], a: A): List[A]

Intersperse the element a between each adjacent pair of elements in as

Intersperse the element a between each adjacent pair of elements in as

Inherited from
ListFunctions
final
def mapAccumLeft[A, B, C](as: List[A])(c: C, f: (C, A) => (C, B)): (C, List[B])

All of the Bs, in order, and the final C acquired by a stateful left fold over as.

All of the Bs, in order, and the final C acquired by a stateful left fold over as.

Inherited from
ListFunctions
final
def mapAccumRight[A, B, C](as: List[A])(c: C, f: (C, A) => (C, B)): (C, List[B])

All of the Bs, in order as-wise, and the final C acquired by a stateful right fold over as.

All of the Bs, in order as-wise, and the final C acquired by a stateful right fold over as.

Inherited from
ListFunctions
final
def nil[A]: List[A]

scala.Nil with a sometimes more convenient type

scala.Nil with a sometimes more convenient type

Inherited from
ListFunctions
final
def partitionM[A, M[_]](as: List[A])(p: A => M[Boolean])(implicit F: Applicative[M]): M[(List[A], List[A])]

A pair of passing and failing values of as against p.

A pair of passing and failing values of as against p.

Inherited from
ListFunctions
final
def powerset[A](as: List[A]): List[List[A]]
Inherited from
ListFunctions
final
def spanM[A, M[_] : Monad](as: List[A])(p: A => M[Boolean]): M[(List[A], List[A])]

A pair of the longest prefix of passing as against p, and the remainder.

A pair of the longest prefix of passing as against p, and the remainder.

Inherited from
ListFunctions
final
def tailOption[A](as: List[A]): Option[List[A]]
Inherited from
ListFunctions
final
def tailz[A](as: List[A]): List[List[A]]

[as, as.tail, as.tail.tail, ..., Nil]

[as, as.tail, as.tail.tail, ..., Nil]

Inherited from
ListFunctions
final
def takeUntilM[A, M[_] : Monad](as: List[A])(p: A => M[Boolean]): M[List[A]]

Run p(a)s and collect as while p yields false. Don't run any ps after the first true.

Run p(a)s and collect as while p yields false. Don't run any ps after the first true.

Inherited from
ListFunctions
final
def takeWhileM[A, M[_] : Monad](as: List[A])(p: A => M[Boolean]): M[List[A]]

Run p(a)s and collect as while p yields true. Don't run any ps after the first false.

Run p(a)s and collect as while p yields true. Don't run any ps after the first false.

Inherited from
ListFunctions
final
def toNel[A](as: List[A]): Maybe[NonEmptyList[A]]
Inherited from
ListFunctions
final
def toZipper[A](as: List[A]): Maybe[Zipper[A]]
Inherited from
ListFunctions
final
def zipperEnd[A](as: List[A]): Maybe[Zipper[A]]
Inherited from
ListFunctions

Implicits

Inherited implicits

implicit
def listEqual[A](implicit A0: Equal[A]): Equal[List[A]]
Inherited from
ListInstances0
implicit
val listInstance: Traverse[List] & MonadPlus[List] & Alt[List] & BindRec[List] & Zip[List] & Unzip[List] & Align[List] & IsEmpty[List] & Cobind[List]
Inherited from
ListInstances
implicit
def listMonoid[A]: Monoid[List[A]]
Inherited from
ListInstances
implicit
def listOrder[A](implicit A0: Order[A]): Order[List[A]]
Inherited from
ListInstances
implicit
def listShow[A](implicit A: Show[A]): Show[List[A]]
Inherited from
ListInstances