AllFunctions

Companion
object
class Object
trait Matchable
class Any
object Scalaz

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 ToScalazOrderFromOrdering[A](oa: Ordering[A]): Order[A]
Inherited from
OrderingFunctions
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 cata[A, X](oa: Option[A])(some: A => X, none: => X): X

Catamorphism over the option. Returns the provided function some applied to item contained in the Option if it is defined, otherwise, the provided value none.

Catamorphism over the option. Returns the provided function some applied to item contained in the Option if it is defined, otherwise, the provided value none.

Inherited from
OptionFunctions
def charsNel(s: String, e: => NonEmptyList[Char]): NonEmptyList[Char]

Constructs a non-empty list with the given string if it is not empty, otherwise, returns the second argument.

Constructs a non-empty list with the given string if it is not empty, otherwise, returns the second argument.

Inherited from
StringFunctions
def charsNel(s: String): Maybe[NonEmptyList[Char]]

Constructs a non-empty list with the value if it is not empty, otherwise, throws an error.

Constructs a non-empty list with the value if it is not empty, otherwise, throws an error.

Inherited from
StringFunctions
final
def conditional(p: Boolean, q: => Boolean): Boolean

Conditional.

Conditional.

p q  p --> q
0 0  1
0 1  1
1 0  0
1 1  1
Inherited from
BooleanFunctions
final
def conjunction(p: Boolean, q: => Boolean): Boolean

Conjunction. (AND)

Conjunction. (AND)

p q  p ∧ q
0 0  0
0 1  0
1 0  0
1 1  1
Inherited from
BooleanFunctions
final
def disjunction(p: Boolean, q: => Boolean): Boolean

Disjunction. (OR)

Disjunction. (OR)

p q  p ∨ q
0 0  0
0 1  1
1 0  1
1 1  1
Inherited from
BooleanFunctions
final
def emptyOrPoint[M[_], A](cond: Boolean)(a: => A)(implicit M: Applicative[M], M0: PlusEmpty[M]): M[A]

Returns the value a lifted into the context M if cond is false, otherwise, the empty value for M.

Returns the value a lifted into the context M if cond is false, otherwise, the empty value for M.

Inherited from
BooleanFunctions
final
def emptyOrPointNT[M[_]](cond: Boolean)(implicit M: Applicative[M], M0: PlusEmpty[M]): NaturalTransformation[Id, M]

emptyOrPoint curried into a natural transformation.

emptyOrPoint curried into a natural transformation.

Inherited from
BooleanFunctions
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 fix[A](f: (=> A) => A): A

f(f(f(... for referentially transparent f.

f(f(f(... for referentially transparent f.

Since

7.0.1

Inherited from
FunctionFunctions
final
def fold[A](cond: Boolean, t: => A, f: => A): A
Returns

t if cond is true, f otherwise

Inherited from
BooleanFunctions
final
def fold[A, X](oa: Option[A])(some: A => X, none: => X): X

Alias for cata

Alias for cata

Inherited from
OptionFunctions
final
def foldLift[F[_], A, B](oa: Option[A])(b: => B, k: F[A] => B)(implicit p: Applicative[F]): B

Returns the given value if None, otherwise lifts the Some value and passes it to the given function.

Returns the given value if None, otherwise lifts the Some value and passes it to the given function.

Inherited from
OptionFunctions
final
def foldLiftOpt[A, B](oa: Option[A])(b: => B, k: Option[A] => B): B

Returns the given value if None, otherwise lifts the Some value to Option and passes it to the given function.

Returns the given value if None, otherwise lifts the Some value to Option and passes it to the given function.

Inherited from
OptionFunctions
final
def getOrElseF[A, F[_] : Applicative](oa: Option[A])(fa: => F[A]): F[A]

Returns the item contained in the Option wrapped in type F if the Option is defined, otherwise, returns the supplied action.

Returns the item contained in the Option wrapped in type F if the Option is defined, otherwise, returns the supplied action.

Inherited from
OptionFunctions
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 heads[A](as: LazyList[A]): LazyList[LazyList[A]]

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

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

Inherited from
LazyListFunctions
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 interleave[A](s1: LazyList[A], s2: LazyList[A]): LazyList[A]
Inherited from
LazyListFunctions
final
def intersperse[A](as: LazyList[A], a: A): LazyList[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
LazyListFunctions
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 inverseConditional(p: Boolean, q: => Boolean): Boolean

Inverse Conditional.

Inverse Conditional.

p q  p <-- q
0 0  1
0 1  0
1 0  1
1 1  1
Inherited from
BooleanFunctions
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 nand(p: Boolean, q: => Boolean): Boolean

Negation of Conjunction. (NAND)

Negation of Conjunction. (NAND)

p q  p !&& q
0 0  1
0 1  1
1 0  1
1 1  0
Inherited from
BooleanFunctions
final
def negConditional(p: Boolean, q: => Boolean): Boolean

Negational of Conditional.

Negational of Conditional.

p q  p ⇏ q
0 0  0
0 1  0
1 0  1
1 1  0
Inherited from
BooleanFunctions
final
def negInverseConditional(p: Boolean, q: => Boolean): Boolean

Negation of Inverse Conditional.

Negation of Inverse Conditional.

p q  p <\- q
0 0  0
0 1  1
1 0  0
1 1  0
Inherited from
BooleanFunctions
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 none[A]: Option[A]

scala.None with a sometimes more convenient type.

scala.None with a sometimes more convenient type.

Inherited from
OptionFunctions
final
def nor(p: Boolean, q: => Boolean): Boolean

Negation of Disjunction. (NOR)

Negation of Disjunction. (NOR)

p q  p !|| q
0 0  1
0 1  0
1 0  0
1 1  0
Inherited from
BooleanFunctions
final
def option[A](cond: Boolean, a: => A): Option[A]

Returns the given argument in Some if cond is true, None otherwise.

Returns the given argument in Some if cond is true, None otherwise.

Inherited from
BooleanFunctions
final
def orEmpty[A, M[_] : PlusEmpty](oa: Option[A]): M[A]

Returns the item contained in the Option wrapped in type M if the Option is defined, otherwise, the empty value for type M.

Returns the item contained in the Option wrapped in type M if the Option is defined, otherwise, the empty value for type M.

Inherited from
OptionFunctions
def parseBigDecimal(s: String): Validation[String, BigDecimal]
Inherited from
StringFunctions
def parseBigInt(s: String): Validation[String, BigInteger]
Inherited from
StringFunctions
def parseBoolean(s: String): Validation[String, Boolean]
Inherited from
StringFunctions
def parseByte(s: String): Validation[String, Byte]
Inherited from
StringFunctions
def parseDouble(s: String): Validation[String, Double]
Inherited from
StringFunctions
def parseFloat(s: String): Validation[String, Float]
Inherited from
StringFunctions
def parseInt(s: String): Validation[String, Int]
Inherited from
StringFunctions
def parseLong(s: String): Validation[String, Long]
Inherited from
StringFunctions
def parseShort(s: String): Validation[String, Short]
Inherited from
StringFunctions
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
def plural(s: String, n: Long): String

Returns the same String value if the given value is 1 otherwise pluralises this String by appending an "s" unless this String ends with "y" and not one of ["ay", "ey", "iy", "oy", "uy"] in which case the 'y' character is chopped and "ies" is appended.

Returns the same String value if the given value is 1 otherwise pluralises this String by appending an "s" unless this String ends with "y" and not one of ["ay", "ey", "iy", "oy", "uy"] in which case the 'y' character is chopped and "ies" is appended.

Inherited from
StringFunctions
final
def pointOrEmpty[M[_], A](cond: Boolean)(a: => A)(implicit M: Applicative[M], M0: PlusEmpty[M]): M[A]

Returns the value a lifted into the context M if cond is true, otherwise, the empty value for M.

Returns the value a lifted into the context M if cond is true, otherwise, the empty value for M.

Inherited from
BooleanFunctions
final
def pointOrEmptyNT[M[_]](cond: Boolean)(implicit M: Applicative[M], M0: PlusEmpty[M]): NaturalTransformation[Id, M]

pointOrEmpty curried into a natural transformation.

pointOrEmpty curried into a natural transformation.

Inherited from
BooleanFunctions
final
def powerset[A](as: List[A]): List[List[A]]
Inherited from
ListFunctions
final
def some[A](a: A): Option[A]

scala.Some.apply with a sometimes more convenient type.

scala.Some.apply with a sometimes more convenient type.

Inherited from
OptionFunctions
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 tails[A](as: LazyList[A]): LazyList[LazyList[A]]

[as, as.tail, as.tail.tail, ..., LazyList(as.last)]

[as, as.tail, as.tail.tail, ..., LazyList(as.last)]

Inherited from
LazyListFunctions
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
def test(p: Boolean): Int

Returns 1 if p is true, or 0 otherwise.

Returns 1 if p is true, or 0 otherwise.

Inherited from
BooleanFunctions
final
def toFailure[A, B](oa: Option[A])(b: => B): Validation[A, B]
Inherited from
OptionFunctions
final
def toFailureNel[A, B](oa: Option[A])(b: => B): ValidationNel[A, B]
Inherited from
OptionFunctions
final
def toLeft[A, B](oa: Option[A])(b: => B): A \/ B
Inherited from
OptionFunctions
final
def toMaybe[A](oa: Option[A]): Maybe[A]
Inherited from
OptionFunctions
final
def toNel[A](as: List[A]): Maybe[NonEmptyList[A]]
Inherited from
ListFunctions
final
def toRight[A, E](oa: Option[A])(e: => E): E \/ A
Inherited from
OptionFunctions
final
def toSuccess[A, E](oa: Option[A])(e: => E): Validation[E, A]
Inherited from
OptionFunctions
final
def toSuccessNel[A, E](oa: Option[A])(e: => E): ValidationNel[E, A]
Inherited from
OptionFunctions
final
def toZipper[A](as: LazyList[A]): Maybe[Zipper[A]]
Inherited from
LazyListFunctions
final
def toZipper[A](as: List[A]): Maybe[Zipper[A]]
Inherited from
ListFunctions
def unfold[A, B](seed: A)(f: A => Option[(B, A)]): LazyList[B]
Inherited from
LazyListFunctions
final
def unfoldForest[A, B](as: LazyList[A])(f: A => (B, () => LazyList[A])): LazyList[Tree[B]]
Inherited from
LazyListFunctions
final
def unfoldForestM[A, B, M[_] : Monad](as: LazyList[A])(f: A => M[(B, LazyList[A])]): M[LazyList[Tree[B]]]
Inherited from
LazyListFunctions
def unfoldm[A, B](seed: A)(f: A => Maybe[(B, A)]): LazyList[B]
Inherited from
LazyListFunctions
final
def unless(cond: Boolean)(f: => Unit): Unit

Executes the given side-effect if cond is false

Executes the given side-effect if cond is false

Inherited from
BooleanFunctions
final
def unlessM[M[_], A](cond: Boolean)(f: => M[A])(implicit M: Applicative[M]): M[Unit]

Returns the given argument if cond is false, otherwise, unit lifted into M.

Returns the given argument if cond is false, otherwise, unit lifted into M.

Inherited from
BooleanFunctions
final
def unlessMU[MA](cond: Boolean)(f: => MA)(implicit M: Unapply[[F[_]] =>> Applicative[F], MA]): M[Unit]

A version of unlessM that infers the type constructor M.

A version of unlessM that infers the type constructor M.

Inherited from
BooleanFunctions
final
def valueOrZero[A](cond: Boolean)(value: => A)(implicit z: Monoid[A]): A

Returns the given argument if cond is true, otherwise, the zero element for the type of the given argument.

Returns the given argument if cond is true, otherwise, the zero element for the type of the given argument.

Inherited from
BooleanFunctions
final
def when(cond: Boolean)(f: => Unit): Unit

Executes the given side-effect if cond is true

Executes the given side-effect if cond is true

Inherited from
BooleanFunctions
final
def whenM[M[_], A](cond: Boolean)(f: => M[A])(implicit M: Applicative[M]): M[Unit]

Returns the given argument if cond is true, otherwise, unit lifted into M.

Returns the given argument if cond is true, otherwise, unit lifted into M.

Inherited from
BooleanFunctions
final
def whenMU[MA](cond: Boolean)(f: => MA)(implicit M: Unapply[[F[_]] =>> Applicative[F], MA]): M[Unit]

A version of whenM that infers the type constructor M.

A version of whenM that infers the type constructor M.

Inherited from
BooleanFunctions
final
def zapp[A, B, C](a: LazyList[A])(f: LazyList[A => B => C]): LazyList[B => C]
Inherited from
LazyListFunctions
final
def zeroOrValue[A](cond: Boolean)(value: => A)(implicit z: Monoid[A]): A

Returns the given argument if cond is false, otherwise, the zero element for the type of the given argument.

Returns the given argument if cond is false, otherwise, the zero element for the type of the given argument.

Inherited from
BooleanFunctions
final
def zipperEnd[A](as: LazyList[A]): Maybe[Zipper[A]]
Inherited from
LazyListFunctions
final
def zipperEnd[A](as: List[A]): Maybe[Zipper[A]]
Inherited from
ListFunctions

Deprecated and Inherited methods

@deprecated("use emptyOrPoint instead", since = "7.3.0")
final
def emptyOrPure[M[_], A](cond: Boolean)(a: => A)(implicit M: Applicative[M], M0: PlusEmpty[M]): M[A]

Returns the value a lifted into the context M if cond is false, otherwise, the empty value for M.

Returns the value a lifted into the context M if cond is false, otherwise, the empty value for M.

Deprecated
[Since version 7.3.0]
Inherited from
BooleanFunctions
@deprecated("use emptyOrPointNT instead", since = "7.3.0")
final
def emptyOrPureNT[M[_]](cond: Boolean)(implicit M: Applicative[M], M0: PlusEmpty[M]): NaturalTransformation[Id, M]
Deprecated
[Since version 7.3.0]
Inherited from
BooleanFunctions