Scalaz
Type members
Inherited classlikes
Inherited types
The strict identity type constructor. Can be thought of as Tuple1
, but with no
runtime representation.
The strict identity type constructor. Can be thought of as Tuple1
, but with no
runtime representation.
- Inherited from
- IdInstances
Value members
Inherited methods
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
[(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
Combinations of as
and as
, excluding same-element pairs.
Combinations of as
and as
, excluding same-element pairs.
- Inherited from
- ListFunctions
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
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
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
Conjunction. (AND)
Conjunction. (AND)
p q p ∧ q
0 0 0
0 1 0
1 0 0
1 1 1
- Inherited from
- BooleanFunctions
Disjunction. (OR)
Disjunction. (OR)
p q p ∨ q
0 0 0
0 1 1
1 0 1
1 1 1
- Inherited from
- BooleanFunctions
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
emptyOrPoint curried into a natural transformation.
emptyOrPoint curried into a natural transformation.
- Inherited from
- BooleanFunctions
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
f(f(f(...
for referentially transparent f
.
f(f(f(...
for referentially transparent f
.
- Since
7.0.1
- Inherited from
- FunctionFunctions
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
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
Requires explicit usage as the use of Await.result
. Can throw an exception, which is inherently bad.
Requires explicit usage as the use of Await.result
. Can throw an exception, which is inherently bad.
- Inherited from
- FutureInstances
Grab a value out of SortedMap if it's present. Otherwise evaluate a value to be placed at that key in the SortedMap.
Grab a value out of SortedMap if it's present. Otherwise evaluate a value to be placed at that key in the SortedMap.
- Inherited from
- SortedMapFunctions
Grab a value out of Map if it's present. Otherwise evaluate a value to be placed at that key in the Map.
Grab a value out of Map if it's present. Otherwise evaluate a value to be placed at that key in the Map.
- Inherited from
- MapFunctions
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
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
groupWhenM
specialized to scalaz.Id.Id.
groupWhenM
specialized to scalaz.Id.Id.
- Inherited from
- ListFunctions
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
[as take 1, as take 2, ..., as]
[as take 1, as take 2, ..., as]
- Inherited from
- LazyListFunctions
[Nil, as take 1, as take 2, ..., as]
[Nil, as take 1, as take 2, ..., as]
- Inherited from
- ListFunctions
As with SortedMap.updated
, but resolve a collision with f
. The
first argument is guaranteed to be from m1
.
As with SortedMap.updated
, but resolve a collision with f
. The
first argument is guaranteed to be from m1
.
- Inherited from
- SortedMapFunctions
As with Map.updated
, but resolve a collision with f
. The
first argument is guaranteed to be from m1
.
As with Map.updated
, but resolve a collision with f
. The
first argument is guaranteed to be from m1
.
- Inherited from
- MapFunctions
Collect only elements with matching keys, joining their
associated values with f
.
Collect only elements with matching keys, joining their
associated values with f
.
- Inherited from
- SortedMapFunctions
Collect only elements with matching keys, joining their
associated values with f
.
Collect only elements with matching keys, joining their
associated values with f
.
- Inherited from
- MapFunctions
Like intersectWith
, but tell f
about the key.
Like intersectWith
, but tell f
about the key.
- Inherited from
- SortedMapFunctions
Like intersectWith
, but tell f
about the key.
Like intersectWith
, but tell f
about the key.
- Inherited from
- MapFunctions
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
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
Inverse Conditional.
Inverse Conditional.
p q p <-- q
0 0 1
0 1 0
1 0 1
1 1 1
- Inherited from
- BooleanFunctions
All of the B
s, in order, and the final C
acquired by a
stateful left fold over as
.
All of the B
s, in order, and the final C
acquired by a
stateful left fold over as
.
- Inherited from
- ListFunctions
All of the B
s, in order as
-wise, and the final C
acquired
by a stateful right fold over as
.
All of the B
s, in order as
-wise, and the final C
acquired
by a stateful right fold over as
.
- Inherited from
- ListFunctions
Exchange keys of m
according to f
. Result may be smaller if
f
maps two or more K
s to the same K2
, in which case the
resulting associated value is an arbitrary choice.
Exchange keys of m
according to f
. Result may be smaller if
f
maps two or more K
s to the same K2
, in which case the
resulting associated value is an arbitrary choice.
- Inherited from
- SortedMapFunctions
Exchange keys of m
according to f
. Result may be smaller if
f
maps two or more K
s to the same K2
, in which case the
resulting associated value is an arbitrary choice.
Exchange keys of m
according to f
. Result may be smaller if
f
maps two or more K
s to the same K2
, in which case the
resulting associated value is an arbitrary choice.
- Inherited from
- MapFunctions
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
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
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
scala.Nil with a sometimes more convenient type
scala.Nil with a sometimes more convenient type
- Inherited from
- ListFunctions
scala.None with a sometimes more convenient type.
scala.None with a sometimes more convenient type.
- Inherited from
- OptionFunctions
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
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
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
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
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
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
pointOrEmpty curried into a natural transformation.
pointOrEmpty curried into a natural transformation.
- Inherited from
- BooleanFunctions
scala.Some.apply with a sometimes more convenient type.
scala.Some.apply with a sometimes more convenient type.
- Inherited from
- OptionFunctions
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
[as, as.tail, as.tail.tail, ..., LazyList(as.last)]
[as, as.tail, as.tail.tail, ..., LazyList(as.last)]
- Inherited from
- LazyListFunctions
[as, as.tail, as.tail.tail, ..., Nil]
[as, as.tail, as.tail.tail, ..., Nil]
- Inherited from
- ListFunctions
Run p(a)
s and collect as
while p
yields false. Don't run
any p
s after the first true.
Run p(a)
s and collect as
while p
yields false. Don't run
any p
s after the first true.
- Inherited from
- ListFunctions
Run p(a)
s and collect as
while p
yields true. Don't run
any p
s after the first false.
Run p(a)
s and collect as
while p
yields true. Don't run
any p
s after the first false.
- Inherited from
- ListFunctions
Returns 1
if p
is true, or 0
otherwise.
Returns 1
if p
is true, or 0
otherwise.
- Inherited from
- BooleanFunctions
- Inherited from
- LazyListFunctions
Union, resolving collisions with f
, where the first arg is
guaranteed to be from m1
, the second from m2
.
Union, resolving collisions with f
, where the first arg is
guaranteed to be from m1
, the second from m2
.
- Note
iff
f
gives rise to a scalaz.Semigroup, so doesunionWith(_, _)(f)
.- Inherited from
- SortedMapFunctions
Union, resolving collisions with f
, where the first arg is
guaranteed to be from m1
, the second from m2
.
Union, resolving collisions with f
, where the first arg is
guaranteed to be from m1
, the second from m2
.
- Note
iff
f
gives rise to a scalaz.Semigroup, so doesunionWith(_, _)(f)
.- Inherited from
- MapFunctions
Like unionWith
, but telling f
about the key.
Like unionWith
, but telling f
about the key.
- Inherited from
- SortedMapFunctions
Like unionWith
, but telling f
about the key.
Like unionWith
, but telling f
about the key.
- Inherited from
- MapFunctions
Executes the given side-effect if cond
is false
Executes the given side-effect if cond
is false
- Inherited from
- BooleanFunctions
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
A version of unlessM
that infers the type constructor M
.
A version of unlessM
that infers the type constructor M
.
- Inherited from
- BooleanFunctions
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
Executes the given side-effect if cond
is true
Executes the given side-effect if cond
is true
- Inherited from
- BooleanFunctions
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
A version of whenM
that infers the type constructor M
.
A version of whenM
that infers the type constructor M
.
- Inherited from
- BooleanFunctions
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
Deprecated and Inherited methods
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
[Since version 7.3.0]
- Inherited from
- BooleanFunctions
Inherited fields
Implicits
Inherited implicits
- Inherited from
- ToApplicativeErrorOps0
- Inherited from
- ToApplicativeOpsU
- Inherited from
- ToApplicativePlusOps0
- Inherited from
- ToApplicativePlusOpsU
- Inherited from
- ToArrowOps0
- Inherited from
- ToAssociativeOps0
- Inherited from
- ToAssociativeOpsU
- Inherited from
- ToAssociativeOps0
- Inherited from
- ToBifoldableOpsU
- Inherited from
- ToBifoldableOps0
- Inherited from
- ToBifunctorOpsU
- Inherited from
- ToBifunctorOps0
- Inherited from
- ToBitraverseOpsU
- Inherited from
- ToBitraverseOps0
- Inherited from
- ToCatchableOpsU
- Inherited from
- ToCategoryOpsU
- Inherited from
- ToCategoryOps0
- Inherited from
- ToChoiceOps0
- Inherited from
- ToComonadOpsU
- Inherited from
- ToComposeOpsU
- Inherited from
- ToComposeOps0
- Inherited from
- ToContravariantOpsU
- Inherited from
- ToFoldable1OpsU
- Inherited from
- ToFoldableOpsU
- Inherited from
- ToFunctorOpsU
- Inherited from
- ToKleisliOps0
- Inherited from
- ToMonadPlusOpsU
- Inherited from
- ToOptionalOpsU
- Inherited from
- ToPlusEmptyOpsU
- Inherited from
- ToProChoiceOpsU
- Inherited from
- ToProChoiceOps0
- Inherited from
- ToProfunctorOpsU
- Inherited from
- ToProfunctorOps0
- Inherited from
- ToSplitOps0
- Inherited from
- ToStrongOps0
- Inherited from
- ToTraverse1OpsU
- Inherited from
- ToTraverseOpsU
- Inherited from
- ToTupleOps
- Inherited from
- ToTupleOps
- Inherited from
- ToTupleOps
- Inherited from
- ToTupleOps
- Inherited from
- ToTupleOps
- Inherited from
- BigInts
- Inherited from
- BigIntegerInstances
- Inherited from
- AnyValInstances
- Inherited from
- AnyValInstances
Right biased monad
Right biased monad
- Inherited from
- EitherInstances
- Inherited from
- FunctionInstances
- Inherited from
- FunctionInstances
- Inherited from
- FunctionInstances0
- Inherited from
- FunctionInstances
- Inherited from
- FunctionInstances
- Inherited from
- FunctionInstances
- Inherited from
- FunctionInstances
- Inherited from
- FunctionInstances
- Inherited from
- FunctionInstances
- Inherited from
- FutureInstances1
An alternative scalaz.Applicative instance for LazyList
, discriminated by the type tag scalaz.Tags.Zip,
that zips lazylists together.
An alternative scalaz.Applicative instance for LazyList
, discriminated by the type tag scalaz.Tags.Zip,
that zips lazylists together.
Example:
import scalaz.Tags.Zip
lazylistZipApplicative.apply2(Zip(LazyList(1, 2)), Zip(LazyList(3, 4)))(_ * _) // LazyList(3, 8)
- Inherited from
- LazyListInstances
Covariant over the value parameter, where plus
applies the
Last
semigroup to values.
Covariant over the value parameter, where plus
applies the
Last
semigroup to values.
- Inherited from
- MapInstances
Map union monoid, unifying values with V
's append
.
Map union monoid, unifying values with V
's append
.
- Inherited from
- MapInstances
Add None
as an element less than all A
s.
Add None
as an element less than all A
s.
- Inherited from
- OptionInstances
- Inherited from
- PartialFunctionInstances
We could derive set equality from Equal[A]
, but it would be O(n^2)
.
Instead, we require Order[A]
, reducing the complexity to O(log n)
We could derive set equality from Equal[A]
, but it would be O(n^2)
.
Instead, we require Order[A]
, reducing the complexity to O(log n)
If Equal[A].equalIsNatural == true
, than Any#==
is used.
- Inherited from
- SetInstances
Covariant over the value parameter, where plus
applies the
Last
semigroup to values.
Covariant over the value parameter, where plus
applies the
Last
semigroup to values.
- Inherited from
- SortedMapInstances
SortedMap union monoid, unifying values with V
's append
.
SortedMap union monoid, unifying values with V
's append
.
- Inherited from
- SortedMapInstances
An alternative scalaz.Applicative instance for Stream
, discriminated by the type tag scalaz.Tags.Zip,
that zips streams together.
An alternative scalaz.Applicative instance for Stream
, discriminated by the type tag scalaz.Tags.Zip,
that zips streams together.
Example:
import scalaz.Tags.Zip
streamZipApplicative.apply2(Zip(Stream(1, 2)), Zip(Stream(3, 4)))(_ * _) // Stream(3, 8)
- Inherited from
- StreamInstances
Tuple1[A]
is isomorphic to Id[X]
Tuple1[A]
is isomorphic to Id[X]
- Inherited from
- TupleInstances2
- Inherited from
- TupleInstances3
- Inherited from
- TupleInstances2
- Inherited from
- TupleInstances1
- Inherited from
- TupleInstances3
- Inherited from
- TupleInstances3
- Inherited from
- TupleInstances0
- Inherited from
- TupleInstances2
- Inherited from
- TupleInstances3
- Inherited from
- TupleInstances3
- Inherited from
- TupleInstances3
- Inherited from
- TupleInstances3
- Inherited from
- TupleInstances3
- Inherited from
- TupleInstances3