NestedSyntax

cats.effect.kernel.Resource$.NestedSyntax
final implicit class NestedSyntax[F[_], A](val self: Resource[[_] =>> Resource[F, _$108], A]) extends AnyVal

Attributes

Source
Resource.scala
Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Value members

Concrete methods

def flattenK(implicit F: MonadCancel[F, Throwable]): Resource[F, A]

Flattens the outer Resource scope with the inner, mirroring the semantics of Resource.flatMap.

Flattens the outer Resource scope with the inner, mirroring the semantics of Resource.flatMap.

This function is useful in cases where some generic combinator (such as GenSpawn.background) explicitly returns a value within a Resource effect, and that generic combinator is itself used within an outer Resource. In this case, it is often desirable to flatten the inner and outer Resource together. flattenK implements this flattening operation with the same semantics as Resource.flatMap.

Attributes

Source
Resource.scala

Concrete fields

val self: Resource[[_] =>> Resource[F, _$108], A]

Attributes

Source
Resource.scala