trait ListFunctions extends AnyRef
- Alphabetic
- By Inheritance
- ListFunctions
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
<^>[A, B](as: List[A])(f: (NonEmptyList[A]) ⇒ B)(implicit arg0: Monoid[B]): B
Returns
f
applied to the contents ofas
if non-empty, otherwise, the zero element of theMonoid
for the typeB
. -
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
adjacentPairs[A](as: List[A]): List[(A, A)]
[(as(0), as(1)), (as(1), as(2)), ... (as(size-2), as(size-1))]
-
final
def
allPairs[A](as: List[A]): List[(A, A)]
Combinations of
as
andas
, excluding same-element pairs. -
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
final
def
breakM[A, M[_]](as: List[A])(p: (A) ⇒ M[Boolean])(implicit arg0: Monad[M]): M[(List[A], List[A])]
spanM
withp
's complement. -
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def filterM[A, M[_]](as: List[A])(p: (A) ⇒ M[Boolean])(implicit arg0: Applicative[M]): M[List[A]]
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
findM[A, M[_]](as: List[A])(p: (A) ⇒ M[Boolean])(implicit arg0: Monad[M]): M[Maybe[A]]
Run
p(a)
s left-to-right until it yields a true value, answeringMaybe.Just(that)
, orMaybe.empty
if nothing matchedp
. -
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
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 -
final
def
groupWhen[A](as: List[A])(p: (A, A) ⇒ Boolean): List[NonEmptyList[A]]
groupWhenM
specialized to scalaz.Id.Id. -
final
def
groupWhenM[A, M[_]](as: List[A])(p: (A, A) ⇒ M[Boolean])(implicit arg0: Monad[M]): M[List[NonEmptyList[A]]]
Split at each point where
p(as(n), as(n+1))
yields false. -
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
initz[A](as: List[A]): List[List[A]]
[Nil, as take 1, as take 2, ..., as]
-
final
def
intersperse[A](as: List[A], a: A): List[A]
Intersperse the element
a
between each adjacent pair of elements inas
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
mapAccumLeft[A, B, C](as: List[A])(c: C, f: (C, A) ⇒ (C, B)): (C, List[B])
All of the
B
s, in order, and the finalC
acquired by a stateful left fold overas
. -
final
def
mapAccumRight[A, B, C](as: List[A])(c: C, f: (C, A) ⇒ (C, B)): (C, List[B])
All of the
B
s, in orderas
-wise, and the finalC
acquired by a stateful right fold overas
. -
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
nil[A]: List[A]
scala.Nil with a sometimes more convenient type
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
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
againstp
. - final def powerset[A](as: List[A]): List[List[A]]
-
final
def
spanM[A, M[_]](as: List[A])(p: (A) ⇒ M[Boolean])(implicit arg0: Monad[M]): M[(List[A], List[A])]
A pair of the longest prefix of passing
as
againstp
, and the remainder. -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- final def tailOption[A](as: List[A]): Option[List[A]]
-
final
def
tailz[A](as: List[A]): List[List[A]]
[as, as.tail, as.tail.tail, ..., Nil]
-
final
def
takeUntilM[A, M[_]](as: List[A])(p: (A) ⇒ M[Boolean])(implicit arg0: Monad[M]): M[List[A]]
Run
p(a)
s and collectas
whilep
yields false.Run
p(a)
s and collectas
whilep
yields false. Don't run anyp
s after the first true. -
final
def
takeWhileM[A, M[_]](as: List[A])(p: (A) ⇒ M[Boolean])(implicit arg0: Monad[M]): M[List[A]]
Run
p(a)
s and collectas
whilep
yields true.Run
p(a)
s and collectas
whilep
yields true. Don't run anyp
s after the first false. - final def toNel[A](as: List[A]): Maybe[NonEmptyList[A]]
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- final def toZipper[A](as: List[A]): Maybe[Zipper[A]]
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- final def zipperEnd[A](as: List[A]): Maybe[Zipper[A]]