A NonEmptyForEach
describes a ForEach
that is guaranteed to contain at least one element, such as a NonEmptyList
, a NonEmptyChunk
, or certain tree like data structures.
Because of the additional information that there is always at least one element, certain operations are available on a NonEmptyForEach
that are not available on a ForEach
. For example, if an ordering is defined on the elements of a NonEmptyForEach
then min
and max
are defined, whereas for a ForEach
only minOption
and maxOption
would be, since the collection might not contain any elements at all.
Attributes
- Companion
- object
- Graph
-
- Supertypes
- Known subtypes
-
trait DeriveEqualNonEmptyForEach[F]
Members list
Value members
Abstract methods
Traverse each element in the collection using the specified effectual function f
, returning a new collection with the results in the context of the effect.
Traverse each element in the collection using the specified effectual function f
, returning a new collection with the results in the context of the effect.
Attributes
Concrete methods
Converts a collection with elements that are in the context of effects to a collection of elements in the context of an effect.
Converts a collection with elements that are in the context of effects to a collection of elements in the context of an effect.
Attributes
Traverse each element in the collection using the specified effectual function f
, returning a new collection with the results in the context of the effect.
Traverse each element in the collection using the specified effectual function f
, returning a new collection with the results in the context of the effect.
Attributes
- Definition Classes
Traverses each element in the collection with the specified effectual function f
purely for its effects.
Traverses each element in the collection with the specified effectual function f
purely for its effects.
Attributes
Traverses each element in the collection with the specified effectual function f
purely for its effects.
Traverses each element in the collection with the specified effectual function f
purely for its effects.
Attributes
- Definition Classes
Returns the largest value in the collection if one exists or None
otherwise.
Returns the largest value in the collection if one exists or None
otherwise.
Attributes
Returns the largest element in the collection if one exists, using the function f
to map each element to a type for which an Ord
is defined, or None
otherwise.
Returns the largest element in the collection if one exists, using the function f
to map each element to a type for which an Ord
is defined, or None
otherwise.
Attributes
Returns the smallest value in the collection if one exists or None
otherwise.
Returns the smallest value in the collection if one exists or None
otherwise.
Attributes
Returns the smallest element in the collection if one exists, using the function f
to map each element to a type for which an Ord
is defined, or None
otherwise.
Returns the smallest element in the collection if one exists, using the function f
to map each element to a type for which an Ord
is defined, or None
otherwise.
Attributes
Reduces the non-empty collection of associative elements.
Reduces the non-empty collection of associative elements.
Attributes
Reduces the collection to a summary value using the binary function f
.
Reduces the collection to a summary value using the binary function f
.
Attributes
Reduces the collection to a summary value using the idempotent operation, returning None
if the collection is empty.
Reduces the collection to a summary value using the idempotent operation, returning None
if the collection is empty.
Attributes
Maps each element of the collection to a type B
for which a combine operation is defined using the function f
and then reduces those values to a single summary using the combine operation.
Maps each element of the collection to a type B
for which a combine operation is defined using the function f
and then reduces those values to a single summary using the combine operation.
Attributes
Reduces the elements of this collection from left to right using the function map
to transform the first value to the type B
and then the function reduceAll
to combine the B
value with each other A
value.
Reduces the elements of this collection from left to right using the function map
to transform the first value to the type B
and then the function reduceAll
to combine the B
value with each other A
value.
Attributes
Reduces the elements of this collection from right to left using the function map
to transform the first value to the type B
and then the function reduceAll
to combine the B
value with each other A
value.
Reduces the elements of this collection from right to left using the function map
to transform the first value to the type B
and then the function reduceAll
to combine the B
value with each other A
value.
Attributes
Converts the collection to a NonEmptyChunk
.
Converts the collection to a NonEmptyChunk
.
Attributes
Converts the collection to a NonEmptyList
.
Converts the collection to a NonEmptyList
.
Attributes
Inherited methods
Collects elements of the collection for which the partial functionpf
is defined.
Collects elements of the collection for which the partial functionpf
is defined.
Attributes
- Inherited from:
- ForEach
Collects elements of the collection for which the effectual partial function pf
is defined.
Collects elements of the collection for which the effectual partial function pf
is defined.
Attributes
- Inherited from:
- ForEach
Attributes
- Inherited from:
- ForEach
Compose covariant and contravariant functors.
Compose two covariant functors.
Compose two invariant functors.
Attributes
- Inherited from:
- Invariant
Reduces the collection to a summary value using the associative operation. Alias for fold
.
Reduces the collection to a summary value using the associative operation. Alias for fold
.
Attributes
- Inherited from:
- ForEach
Returns whether the collection contains the specified element.
Returns the number of elements in the collection that satisfy the specified predicate.
Returns the number of elements in the collection that satisfy the specified predicate.
Attributes
- Inherited from:
- ForEach
Returns whether any element of the collection satisfies the specified predicate.
Returns whether any element of the collection satisfies the specified predicate.
Attributes
- Inherited from:
- ForEach
Filters the collection with the predicate f
.
Filters the collection with the effectual predicate f
.
Returns the first element in the collection satisfying the specified predicate if one exists or None
otherwise.
Returns the first element in the collection satisfying the specified predicate if one exists or None
otherwise.
Attributes
- Inherited from:
- ForEach
Converts a collection with elements that are in the context of effects to a collection of elements in the context of an effect.
Converts a collection with elements that are in the context of effects to a collection of elements in the context of an effect.
Attributes
- Inherited from:
- ForEach
Folds over the elements of this collection using an associative operation and an identity. Alias for reduceIdentity
.
Folds over the elements of this collection using an associative operation and an identity. Alias for reduceIdentity
.
Attributes
- Inherited from:
- ForEach
Folds over the elements of this collection from left to right to produce a summary value, maintaining some internal state along the way.
Folds over the elements of this collection from left to right to produce a summary value, maintaining some internal state along the way.
Attributes
- Inherited from:
- ForEach
Effectually fold over the elements of this collection from left to right to produce a summary value, maintaining some internal state along the way.
Effectually fold over the elements of this collection from left to right to produce a summary value, maintaining some internal state along the way.
Attributes
- Inherited from:
- ForEach
Maps each element of the collection to a type B
for which an Identity
is defined using the function f
, then reduces those values to a single summary using the combine
operation of Identity
, or the identity
element if the collection is empty.
Maps each element of the collection to a type B
for which an Identity
is defined using the function f
, then reduces those values to a single summary using the combine
operation of Identity
, or the identity
element if the collection is empty.
Attributes
- Inherited from:
- ForEach
Effectfully maps each element of the collection to a type B
for which an Identity
is defined using the function f
, then reduces those values to a single summary using the combine
operation of Identity
, or the identity
element if the collection is empty.
Effectfully maps each element of the collection to a type B
for which an Identity
is defined using the function f
, then reduces those values to a single summary using the combine
operation of Identity
, or the identity
element if the collection is empty.
Attributes
- Inherited from:
- ForEach
Folds over the elements of this collection from right to left to produce a summary value, maintaining some internal state along the way.
Folds over the elements of this collection from right to left to produce a summary value, maintaining some internal state along the way.
Attributes
- Inherited from:
- ForEach
Effectually fold over the elements of this collection from right to left to produce a summary value, maintaining some internal state along the way.
Effectually fold over the elements of this collection from right to left to produce a summary value, maintaining some internal state along the way.
Attributes
- Inherited from:
- ForEach
Attributes
- Inherited from:
- ForEach
Returns whether any element of the collection satisfies the specified predicate.
Returns whether any element of the collection satisfies the specified predicate.
Attributes
- Inherited from:
- ForEach
Attributes
- Inherited from:
- ForEach
Attributes
- Inherited from:
- ForEach
Attributes
- Inherited from:
- Invariant
Folds over the elements of this collection using an associative operation with the middle element interspersed between every element.
Folds over the elements of this collection using an associative operation with the middle element interspersed between every element.
Attributes
- Inherited from:
- ForEach
Attributes
- Inherited from:
- Covariant
Returns whether the collection is empty.
Lifts a function operating on values to a function that operates on each element of a collection.
Lifts a function operating on values to a function that operates on each element of a collection.
Attributes
- Inherited from:
- ForEach
Statefully maps over the elements of the collection, maintaining some state along the way and returning the final state along with the new collection.
Statefully maps over the elements of the collection, maintaining some state along the way and returning the final state along with the new collection.
Attributes
- Inherited from:
- ForEach
Returns the largest element in the collection if one exists, using the function f
to map each element to a type for which an Ord
is defined, or None
otherwise.
Returns the largest element in the collection if one exists, using the function f
to map each element to a type for which an Ord
is defined, or None
otherwise.
Attributes
- Inherited from:
- ForEach
Returns the largest value in the collection if one exists or None
otherwise.
Returns the largest value in the collection if one exists or None
otherwise.
Attributes
- Inherited from:
- ForEach
Returns the smallest element in the collection if one exists, using the function f
to map each element to a type for which an Ord
is defined, or None
otherwise.
Returns the smallest element in the collection if one exists, using the function f
to map each element to a type for which an Ord
is defined, or None
otherwise.
Attributes
- Inherited from:
- ForEach
Returns the smallest value in the collection if one exists or None
otherwise.
Returns the smallest value in the collection if one exists or None
otherwise.
Attributes
- Inherited from:
- ForEach
Returns whether the collection contains at least one element
Partitions the collection based on the specified function.
Partitions the collection based on the specified effectual function.
Partitions the collection based on the specified effectual function.
Attributes
- Inherited from:
- ForEach
Partitions the collection based on the specified validation function.
Partitions the collection based on the specified validation function.
Attributes
- Inherited from:
- ForEach
Returns the product of all elements in the collection.
Reduces the collection to a summary value using the associative operation, returning None
if the collection is empty.
Reduces the collection to a summary value using the associative operation, returning None
if the collection is empty.
Attributes
- Inherited from:
- ForEach
Reduces the collection to a summary value using the idempotent operation, returning None
if the collection is empty.
Reduces the collection to a summary value using the idempotent operation, returning None
if the collection is empty.
Attributes
- Inherited from:
- ForEach
Reduces the collection to a summary value using the associative operation. Alias for fold
.
Reduces the collection to a summary value using the associative operation. Alias for fold
.
Attributes
- Inherited from:
- ForEach
Maps each element of the collection to a type B
for which an associative operation exists and then reduces the values using the associative operation, returning None
if the collection is empty.
Maps each element of the collection to a type B
for which an associative operation exists and then reduces the values using the associative operation, returning None
if the collection is empty.
Attributes
- Inherited from:
- ForEach
Reduces the collection to a summary value using the binary function f
, returning None
if the collection is empty.
Reduces the collection to a summary value using the binary function f
, returning None
if the collection is empty.
Attributes
- Inherited from:
- ForEach
Reverses the order of elements in the collection.
Returns the number of elements in the collection.
Returns the sum of all elements in the collection.
Converts the collection to a Chunk
.
Converts the collection to a List
.
Zips the left collection and right collection together, using None
to handle the case where one collection is larger than the other.
Zips the left collection and right collection together, using None
to handle the case where one collection is larger than the other.
Attributes
- Inherited from:
- ForEach
Zips the left collection and right collection together, using the specified function to handle the cases where one collection is larger than the other.
Zips the left collection and right collection together, using the specified function to handle the cases where one collection is larger than the other.
Attributes
- Inherited from:
- ForEach