Right-associative fold of a structure.
Right-associative fold of a structure.
Transform fa
using f
, collecting all the G
s with ap
.
Whether all A
s in fa
yield true from p
.
Whether all A
s in fa
yield true from p
.
all
with monadic traversal.
all
with monadic traversal.
Whether any A
s in fa
yield true from p
.
Whether any A
s in fa
yield true from p
.
any
with monadic traversal.
any
with monadic traversal.
Alias for map
.
Alias for map
.
Alias for psum.
The composition of Traverse F
and Bitraverse G
, [x, y]F[G[x, y]]
, is a Bitraverse
The composition of Traverse F
and Bitraverse G
, [x, y]F[G[x, y]]
, is a Bitraverse
The composition of Foldable F
and Bifoldable G
, [x, y]F[G[x, y]]
, is a Bifoldable
The composition of Foldable F
and Bifoldable G
, [x, y]F[G[x, y]]
, is a Bifoldable
The composition of Functor F
and Bifunctor G
, [x, y]F[G[x, y]]
, is a Bifunctor
The composition of Functor F
and Bifunctor G
, [x, y]F[G[x, y]]
, is a Bifunctor
The composition of Traverse1 F
and G
, [x]F[G[x]]
, is a Traverse1
The composition of Foldable1 F
and G
, [x]F[G[x]]
, is a Foldable1
The composition of Foldable1 F
and G
, [x]F[G[x]]
, is a Foldable1
The composition of Traverses F
and G
, [x]F[G[x]]
, is a Traverse
The composition of Traverses F
and G
, [x]F[G[x]]
, is a Traverse
The composition of Foldables F
and G
, [x]F[G[x]]
, is a Foldable
The composition of Foldables F
and G
, [x]F[G[x]]
, is a Foldable
The composition of Functors F
and G
, [x]F[G[x]]
, is a Functor
The composition of Functors F
and G
, [x]F[G[x]]
, is a Functor
Alias for length
.
Alias for length
.
complexityO(n log n)
complexityO(n log n)
complexityO(n log n)
complexityO(n log n)
complexityO(n2)
complexityO(n2)
complexityO(n2)
complexityO(n2)
Whether a
is an element of fa
.
Whether a
is an element of fa
.
always return false
The smallest and largest elements of fa
or None if fa
is empty
The smallest and largest elements of fa
or None if fa
is empty
The elements (amin, amax) of fa
which yield the smallest and largest values of f(a)
, respectively, or None if fa
is empty
The elements (amin, amax) of fa
which yield the smallest and largest values of f(a)
, respectively, or None if fa
is empty
The smallest and largest values of f(a)
for each element a
of fa
, or None if fa
is empty
The smallest and largest values of f(a)
for each element a
of fa
, or None if fa
is empty
map elements in a Foldable with a monadic function and return the first element that is mapped successfully
map elements in a Foldable with a monadic function and return the first element that is mapped successfully
Combine the elements of a structure using a monoid.
Combine the elements of a structure using a monoid.
Like fold
but returning None
if the foldable is empty and Some
otherwise
Like fold
but returning None
if the foldable is empty and Some
otherwise
Left-associative fold of a structure.
Left-associative fold of a structure.
Left-associative fold of a structure.
Left-associative, monadic fold of a structure.
Left-associative, monadic fold of a structure.
Map each element of the structure to a scalaz.Monoid, and combine the results.
Map each element of the structure to a scalaz.Monoid, and combine the results.
Map each element of the structure to a scalaz.Semigroup, and combine the results.
Map each element of the structure to a scalaz.Semigroup, and combine the results.
As foldMap
but returning None
if the foldable is empty and Some
otherwise
Left-associative fold of a structure.
Left-associative fold of a structure.
Specialization of foldRightM when B
has a Monoid
.
Specialization of foldRightM when B
has a Monoid
.
Right-associative fold of a structure.
Right-associative fold of a structure.
Right-associative fold of a structure.
Right-associative, monadic fold of a structure.
Right-associative, monadic fold of a structure.
Curried version of foldLeft
Curried version of foldLeft
Curried foldLeft1
.
Curried foldLeft1
.
Curried version of foldLeftM
Curried version of foldLeftM
Curried version of foldLeftM1
Curried version of foldLeftM1
Curried version of foldRight
Curried version of foldRight
Curried foldRight1
.
Curried foldRight1
.
Curried version of foldRightM
Curried version of foldRightM
Curried version of foldRightM1
Curried version of foldRightM1
Twin all A
s in fa
.
Twin all A
s in fa
.
Pair all A
s in fa
with the result of function application.
Pair all A
s in fa
with the result of function application.
The composition of Functor F and Contravariant G, [x]F[G[x]]
,
is contravariant.
The composition of Functor F and Contravariant G, [x]F[G[x]]
,
is contravariant.
the element at index i
in a Some
, or None
if the given index falls outside of the range
the element at index i
, or default
if the given index falls outside of the range
Insert an A
between every A, yielding the sum.
Insert an A
between every A, yielding the sum.
Insert an A
between every A, yielding the sum.
Deforested alias for toStream(fa).size
.
Deforested alias for toStream(fa).size
.
Lift f
into F
.
Lift f
into F
.
Lift f
into F
and apply to F[A]
.
Lift apply(a)
, and apply the result to f
.
Lift apply(a)
, and apply the result to f
.
The greatest element of fa
, or None if fa
is empty.
The greatest element of fa
.
The greatest element of fa
.
The element a
of fa
which yields the greatest value of f(a)
, or None if fa
is empty.
The element a
of fa
which yield the greatest value of f(a)
.
The element a
of fa
which yield the greatest value of f(a)
.
The greatest value of f(a)
for each element a
of fa
, or None if fa
is empty.
The greatest value of f(a)
for each element a
of fa
.
The greatest value of f(a)
for each element a
of fa
.
The smallest element of fa
, or None if fa
is empty.
The smallest element of fa
.
The smallest element of fa
.
The element a
of fa
which yields the smallest value of f(a)
, or None if fa
is empty.
The element a
of fa
which yield the smallest value of f(a)
.
The element a
of fa
which yield the smallest value of f(a)
.
The smallest value of f(a)
for each element a
of fa
, or None if fa
is empty.
The smallest value of f(a)
for each element a
of fa
.
The smallest value of f(a)
for each element a
of fa
.
The product of Traverse1 F
and G
, [x](F[x], G[x]])
, is a Traverse1
The product of Foldable1 F
and G
, [x](F[x], G[x]])
, is a Foldable1
The product of Foldable1 F
and G
, [x](F[x], G[x]])
, is a Foldable1
The product of Traverses F
and G
, [x](F[x], G[x]])
, is a Traverse
The product of Traverses F
and G
, [x](F[x], G[x]])
, is a Traverse
The product of Foldables F
and G
, [x](F[x], G[x]])
, is a Foldable
The product of Foldables F
and G
, [x](F[x], G[x]])
, is a Foldable
The product of Functors F
and G
, [x](F[x], G[x]])
, is a Functor
The product of Functors F
and G
, [x](F[x], G[x]])
, is a Functor
The product of Traverse1 F
and Traverse G
, [x](F[x], G[x]])
, is a Traverse1
The product of Foldable1 F
and Foldable G
, [x](F[x], G[x]])
, is a Foldable1
The product of Foldable1 F
and Foldable G
, [x](F[x], G[x]])
, is a Foldable1
The product of Traverse F
and Traverse1 G
, [x](F[x], G[x]])
, is a Traverse1
The product of Traverse F
and Traverse1 G
, [x](F[x], G[x]])
, is a Traverse1
The product of Foldable F
and Foldable1 G
, [x](F[x], G[x]])
, is a Foldable1
The product of Foldable F
and Foldable1 G
, [x](F[x], G[x]])
, is a Foldable1
Sum using a polymorphic monoid (PlusEmpty).
Map elements to G[B]
and sum using a polymorphic monoid (PlusEmpty).
Selects groups of elements that satisfy p and discards others.
Selects groups of elements that satisfy p and discards others.
Traverse with the identity function.
Traverse with the identity function.
A version of sequence1
where a subsequent monadic join is applied to the inner result
sequence_
for Free.
sequence_
for Free. collapses into a single Free *
A version of sequence
where a subsequent monadic join is applied to the inner result
A version of sequence
where a subsequent monadic join is applied to the inner result
Traverse with State
.
Traverse with State
.
sequence_
specialized to State
*
sequence_
specialized to State
*
A version of sequence
that infers the nested type constructor.
A version of sequence
that infers the nested type constructor.
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
.
Splits the elements into groups that produce the same result by a function f.
Splits the elements into groups that produce the same result by a function f.
Splits into groups of elements that are transitively dependant by a relation r.
Splits into groups of elements that are transitively dependant by a relation r.
Splits the elements into groups that alternatively satisfy and don't satisfy the predicate p.
Splits the elements into groups that alternatively satisfy and don't satisfy the predicate p.
Inject a
to the left of B
s in f
.
Inject a
to the left of B
s in f
.
Inject b
to the right of A
s in f
.
Inject b
to the right of A
s in f
.
A version of traverse1
where a subsequent monadic join is applied to the inner result.
Transform fa
using f
, collecting all the G
s with ap
.
Traverse fa
with a Kleisli[G, S, B]
, internally using a Trampoline
to avoid stack overflow.
Traverse fa
with a Kleisli[G, S, B]
, internally using a Trampoline
to avoid stack overflow.
A version of traverse
where a subsequent monadic join is applied to the inner result.
A version of traverse
where a subsequent monadic join is applied to the inner result.
Traverse with State
.
Traverse with State
.
Traverse fa
with a State[S, G[B]]
, internally using a Trampoline
to avoid stack overflow.
Traverse fa
with a State[S, G[B]]
, internally using a Trampoline
to avoid stack overflow.
traverse_
specialized to State
*
traverse_
specialized to State
*
A version of traverse
that infers the type constructor G
.
A version of traverse
that infers the type constructor G
.
A version of traverse_
that infers the type constructor M
.
A version of traverse_
that infers the type constructor M
.
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
.
Empty fa
of meaningful pure values, preserving its
structure.
Empty fa
of meaningful pure values, preserving its
structure.
Functors are covariant by nature, so we can treat an F[A]
as
an F[B]
if A
is a subtype of B
.
Functors are covariant by nature, so we can treat an F[A]
as
an F[B]
if A
is a subtype of B
.
Converts ma
to a value of type F[B]
using the provided functions f
and g
.
Converts ma
to a value of type F[B]
using the provided functions f
and g
.
Converts ma
to a value of type F[B]
using the provided bijection.
Converts ma
to a value of type F[B]
using the provided bijection.
Converts ma
to a value of type F[B]
using the provided isomorphism.
Converts ma
to a value of type F[B]
using the provided isomorphism.
(Since version 7.3.0) use psum
(Since version 7.3.0) use psum
A scalaz.Traverse where
traverse
is total over scalaz.Applys. That is,toList
cannot return an empty list.