FlattenOps

final class FlattenOps[F[_], A](ffa: F[F[A]]) extends AnyVal
class AnyVal
trait Matchable
class Any

Value members

Concrete methods

def flatten(implicit F: FlatMap[F]): F[A]

Flatten nested F values.

Flatten nested F values.

Example:

scala> import cats.implicits._
scala> type ErrorOr[A] = Either[String, A]
scala> val x: ErrorOr[ErrorOr[Int]] = 3.asRight.asRight
scala> x.flatten
res0: ErrorOr[Int] = Right(3)