← ZIO Prelude docs

IdentityFlatten

zio.prelude.IdentityFlatten
See theIdentityFlatten companion object
trait IdentityFlatten[F[_]] extends AssociativeFlatten[F]

IdentityFlatten described a type that can be "flattened" in an associative way and has an identity element with respect to that operation. For example, with a list we can always vacuously add a layer by wrapping a list in another list constructor and flattening the resulting list always returns the original list unchanged.

Attributes

Companion
object
Source
IdentityFlatten.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
Self type

Members list

Value members

Abstract methods

def any: F[Any]

The identity element.

The identity element.

Attributes

Source
IdentityFlatten.scala

Inherited and Abstract methods

def flatten[A](ffa: F[F[A]]): F[A]

Flattens a value of type F[F[A]] to produce an F[A].

Flattens a value of type F[F[A]] to produce an F[A].

Attributes

Inherited from:
AssociativeFlatten
Source
AssociativeFlatten.scala