flip method

Effect<E, R, L> flip()

{@category mapping}

Implementation

Effect<E, R, L> flip() => Effect.from(
      (context) => _unsafeRun(context).then(
        (exit) => switch (exit) {
          Left(value: final cause) => switch (cause) {
              Failure<L>(error: final error) => Right(error),
              Die() => Left(cause),
              Interrupted() => Left(cause),
            },
          Right(value: final value) => Left(Failure(value)),
        },
      ),
    );