NonEmptyForEachOps

zio.prelude.NonEmptyForEachSyntax.NonEmptyForEachOps
implicit class NonEmptyForEachOps[F[_], A](self: F[A])

Provides infix syntax for traversing collections.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def forEach1[G[_] : Covariant, B](f: A => G[B])(implicit evidence$1: AssociativeBoth[G], evidence$2: Covariant[G], F: NonEmptyForEach[F]): G[F[B]]

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

def forEach1_[G[_] : Covariant](f: A => G[Any])(implicit evidence$1: AssociativeBoth[G], evidence$2: Covariant[G], F: NonEmptyForEach[F]): G[Unit]

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

def reduce1(implicit F: NonEmptyForEach[F], A: Associative[A]): A

Reduces the non-empty collection of associative elements.

Reduces the non-empty collection of associative elements.

Attributes

def reduceAll(f: (A, A) => A)(implicit F: NonEmptyForEach[F]): A

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

def reduceIdempotent1(implicit F: NonEmptyForEach[F], ia: Idempotent[A], ea: Equal[A]): A

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

def reduceMap[B : Associative](f: A => B)(implicit evidence$1: Associative[B], F: NonEmptyForEach[F]): B

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

def reduceMapLeft[B](map: A => B)(reduce: (B, A) => B)(implicit F: NonEmptyForEach[F]): B

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

def reduceMapRight[B](map: A => B)(reduce: (A, B) => B)(implicit F: NonEmptyForEach[F]): B

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