trait ConcurrentEffect[F[_]] extends Concurrent[F] with Effect[F] with Serializable
Type class describing effect data types that are cancelable.
In addition to the algebras of Concurrent and of
Effect, instances must also implement a
runCancelable operation that
triggers the evaluation, suspended in the IO
context, but that
also returns a token that can be used for cancelling the running
computation.
Note this is the safe and generic version of IO.unsafeRunCancelable.
- Annotations
- @implicitNotFound( ... )
- Source
- ConcurrentEffect.scala
- Alphabetic
- By Inheritance
- ConcurrentEffect
- Effect
- Concurrent
- Async
- LiftIO
- Sync
- MonadError
- Monad
- FlatMap
- ApplicativeError
- Applicative
- InvariantMonoidal
- Apply
- ApplyArityFunctions
- InvariantSemigroupal
- Semigroupal
- Functor
- Invariant
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
async[A](k: ((Either[Throwable, A]) ⇒ Unit) ⇒ Unit): F[A]
Creates a simple, noncancelable
F[A]
instance that executes an asynchronous process on evaluation.Creates a simple, noncancelable
F[A]
instance that executes an asynchronous process on evaluation.The given function is being injected with a side-effectful callback for signaling the final result of an asynchronous process.
- k
is a function that should be called with a callback for signaling the result once it is ready
- Definition Classes
- Async
-
abstract
def
cancelable[A](k: ((Either[Throwable, A]) ⇒ Unit) ⇒ IO[Unit]): F[A]
Creates a cancelable
F[A]
instance that executes an asynchronous process on evaluation.Creates a cancelable
F[A]
instance that executes an asynchronous process on evaluation.This builder accepts a registration function that is being injected with a side-effectful callback, to be called when the asynchronous process is complete with a final result.
The registration function is also supposed to return an
IO[Unit]
that captures the logic necessary for cancelling the asynchronous process, for as long as it is still active.Example:
import java.util.concurrent.ScheduledExecutorService import scala.concurrent.duration._ def sleep[F[_]](d: FiniteDuration) (implicit F: Concurrent[F], ec: ScheduledExecutorService): F[A] = { F.cancelable { cb => // Note the callback is pure, so we need to trigger evaluation val run = new Runnable { def run() = cb(Right(())).unsafeRunSync } // Schedules task to run after delay val future = ec.schedule(run, d.length, d.unit) // Cancellation logic, suspended in IO IO(future.cancel()) } }
- Definition Classes
- Concurrent
-
abstract
def
flatMap[A, B](fa: F[A])(f: (A) ⇒ F[B]): F[B]
- Definition Classes
- FlatMap
-
abstract
def
handleErrorWith[A](fa: F[A])(f: (Throwable) ⇒ F[A]): F[A]
- Definition Classes
- ApplicativeError
-
abstract
def
onCancelRaiseError[A](fa: F[A], e: Throwable): F[A]
Returns a new
F
value that mirrors the source for normal termination, but that triggers the given error on cancelation.Returns a new
F
value that mirrors the source for normal termination, but that triggers the given error on cancelation.This
onCancelRaiseError
operator transforms any task into one that on cancelation will terminate with the given error, thus transforming potentially non-terminating tasks into ones that yield a certain error.import scala.concurrent.CancellationException val F = Concurrent[IO] val timer = Timer[IO] val error = new CancellationException("Boo!") val fa = F.onCancelRaiseError(timer.sleep(5.seconds, error)) fa.start.flatMap { fiber => fiber.cancel *> fiber.join }
Without "onCancelRaiseError" the sleep operation yields a non-terminating task on cancellation. But by applying "onCancelRaiseError", the yielded task above will terminate with the indicated "CancellationException" reference, which we can then also distinguish from other errors thrown in the
F
context.Depending on the implementation, tasks that are canceled can become non-terminating. This operation ensures that when cancelation happens, the resulting task is terminated with an error, such that logic can be scheduled to happen after cancelation:
import scala.concurrent.CancellationException val wasCanceled = new CancellationException() F.onCancelRaiseError(fa, wasCanceled).attempt.flatMap { case Right(a) => F.delay(println(s"Success: $a")) case Left(`wasCanceled`) => F.delay(println("Was canceled!")) case Left(error) => F.delay(println(s"Terminated in error: $error")) }
This technique is how a "bracket" operation can be implemented.
Besides sending the cancelation signal, this operation also cuts the connection between the producer and the consumer. Example:
val F = Concurrent[IO] val timer = Timer[IO] // This task is uninterruptible ;-) val tick = F.uncancelable( for { _ <- timer.sleep(5.seconds) _ <- IO(println("Tick!")) } yield ()) // Builds an value that triggers an exception on cancellation val loud = F.onCancelRaiseError(tick, new CancellationException)
In this example the
loud
reference will be completed with a "CancellationException", as indicated via "onCancelRaiseError". The logic of the source won't get cancelled, because we've embedded it all in uncancelable. But its bind continuation is not allowed to continue after that, its final result not being allowed to be signaled.Therefore this also transforms uncancelable values into ones that can be canceled. The logic of the source, its run-loop might not be interruptible, however
cancel
on a value on whichonCancelRaiseError
was applied will cut the connection from the producer, the consumer receiving the indicated error instead.- Definition Classes
- Concurrent
-
abstract
def
pure[A](x: A): F[A]
- Definition Classes
- Applicative
-
abstract
def
racePair[A, B](fa: F[A], fb: F[B]): F[Either[(A, Fiber[F, B]), (Fiber[F, A], B)]]
Run two tasks concurrently, creating a race between them and returns a pair containing both the winner's successful value and the loser represented as a still-unfinished fiber.
Run two tasks concurrently, creating a race between them and returns a pair containing both the winner's successful value and the loser represented as a still-unfinished fiber.
If the first task completes in error, then the result will complete in error, the other task being cancelled.
On usage the user has the option of cancelling the losing task, this being equivalent with plain race:
val ioA: IO[A] = ??? val ioB: IO[B] = ??? Concurrent[IO].racePair(ioA, ioB).flatMap { case Left((a, fiberB)) => fiberB.cancel.map(_ => a) case Right((fiberA, b)) => fiberA.cancel.map(_ => b) }
See race for a simpler version that cancels the loser immediately.
- Definition Classes
- Concurrent
-
abstract
def
raiseError[A](e: Throwable): F[A]
- Definition Classes
- ApplicativeError
-
abstract
def
runAsync[A](fa: F[A])(cb: (Either[Throwable, A]) ⇒ IO[Unit]): IO[Unit]
Evaluates
F[_]
, with the effect of starting the run-loop being suspended in theIO
context.Evaluates
F[_]
, with the effect of starting the run-loop being suspended in theIO
context.Note that evaluating the returned
IO[Unit]
is guaranteed to execute immediately:val io = F.runAsync(fa)(cb) // For triggering actual execution, guaranteed to be // immediate because it doesn't wait for the result io.unsafeRunSync
- Definition Classes
- Effect
-
abstract
def
runCancelable[A](fa: F[A])(cb: (Either[Throwable, A]) ⇒ IO[Unit]): IO[IO[Unit]]
Evaluates
F[_]
with the ability to cancel it.Evaluates
F[_]
with the ability to cancel it.The returned
IO[IO[Unit]]
is a suspended cancelable action that can be used to cancel the running computation.Note that evaluating the returned
IO
value, along with the boxed cancelable action are guaranteed to have immediate (synchronous) execution so you can safely do this, even on top of JavaScript (which has no ability to block threads):val io = F.runCancelable(fa)(cb) // For triggering asynchronous execution val cancel = io.unsafeRunSync // For cancellation cancel.unsafeRunSync
-
abstract
def
start[A](fa: F[A]): F[Fiber[F, A]]
Start concurrent execution of the source suspended in the
F
context.Start concurrent execution of the source suspended in the
F
context.Returns a Fiber that can be used to either join or cancel the running computation, being similar in spirit (but not in implementation) to starting a thread.
- Definition Classes
- Concurrent
-
abstract
def
suspend[A](thunk: ⇒ F[A]): F[A]
Suspends the evaluation of an
F
reference.Suspends the evaluation of an
F
reference.Equivalent to
FlatMap.flatten
for pure expressions, the purpose of this function is to suspend side effects inF
.- Definition Classes
- Sync
-
abstract
def
tailRecM[A, B](a: A)(f: (A) ⇒ F[Either[A, B]]): F[B]
- Definition Classes
- FlatMap
-
abstract
def
uncancelable[A](fa: F[A]): F[A]
Returns a new
F
that mirrors the source, but that is uninterruptible.Returns a new
F
that mirrors the source, but that is uninterruptible.This means that the cancel signal has no effect on the result of join and that the cancelable token returned by ConcurrentEffect.runCancelable on evaluation will have no effect.
This operation is undoing the cancelation mechanism of cancelable, with this equivalence:
F.uncancelable(F.cancelable { cb => f(cb); io }) <-> F.async(f)
Sample:
val F = Concurrent[IO] val timer = Timer[IO] // Normally Timer#sleep yields cancelable tasks val tick = F.uncancelable(timer.sleep(10.seconds)) // This prints "Tick!" after 10 seconds, even if we are // cancelling the Fiber after start: for { fiber <- F.start(tick) _ <- fiber.cancel _ <- fiber.join } yield { println("Tick!") }
Cancelable effects are great in race conditions, however sometimes this operation is necessary to ensure that the bind continuation of a task (the following
flatMap
operations) are also evaluated no matter what.- Definition Classes
- Concurrent
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
*>[A, B](fa: F[A])(fb: F[B]): F[B]
- Definition Classes
- Apply
- Annotations
- @inline()
-
final
def
<*[A, B](fa: F[A])(fb: F[B]): F[A]
- Definition Classes
- Apply
- Annotations
- @inline()
-
final
def
<*>[A, B](ff: F[(A) ⇒ B])(fa: F[A]): F[B]
- Definition Classes
- Apply
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
adaptError[A](fa: F[A])(pf: PartialFunction[Throwable, Throwable]): F[A]
- Definition Classes
- MonadError
-
def
ap[A, B](ff: F[(A) ⇒ B])(fa: F[A]): F[B]
- Definition Classes
- FlatMap → Apply
-
def
ap10[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, Z](f: F[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9) ⇒ Z])(f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9]): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
ap11[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Z](f: F[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) ⇒ Z])(f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10]): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
ap12[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Z](f: F[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) ⇒ Z])(f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11]): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
ap13[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Z](f: F[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12) ⇒ Z])(f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12]): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
ap14[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Z](f: F[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13) ⇒ Z])(f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12], f13: F[A13]): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
ap15[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Z](f: F[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14) ⇒ Z])(f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12], f13: F[A13], f14: F[A14]): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
ap16[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Z](f: F[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15) ⇒ Z])(f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12], f13: F[A13], f14: F[A14], f15: F[A15]): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
ap17[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Z](f: F[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16) ⇒ Z])(f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12], f13: F[A13], f14: F[A14], f15: F[A15], f16: F[A16]): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
ap18[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, Z](f: F[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17) ⇒ Z])(f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12], f13: F[A13], f14: F[A14], f15: F[A15], f16: F[A16], f17: F[A17]): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
ap19[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, Z](f: F[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18) ⇒ Z])(f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12], f13: F[A13], f14: F[A14], f15: F[A15], f16: F[A16], f17: F[A17], f18: F[A18]): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
ap2[A, B, Z](ff: F[(A, B) ⇒ Z])(fa: F[A], fb: F[B]): F[Z]
- Definition Classes
- Apply
-
def
ap20[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, Z](f: F[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19) ⇒ Z])(f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12], f13: F[A13], f14: F[A14], f15: F[A15], f16: F[A16], f17: F[A17], f18: F[A18], f19: F[A19]): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
ap21[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, Z](f: F[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20) ⇒ Z])(f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12], f13: F[A13], f14: F[A14], f15: F[A15], f16: F[A16], f17: F[A17], f18: F[A18], f19: F[A19], f20: F[A20]): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
ap22[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, Z](f: F[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21) ⇒ Z])(f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12], f13: F[A13], f14: F[A14], f15: F[A15], f16: F[A16], f17: F[A17], f18: F[A18], f19: F[A19], f20: F[A20], f21: F[A21]): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
ap3[A0, A1, A2, Z](f: F[(A0, A1, A2) ⇒ Z])(f0: F[A0], f1: F[A1], f2: F[A2]): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
ap4[A0, A1, A2, A3, Z](f: F[(A0, A1, A2, A3) ⇒ Z])(f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3]): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
ap5[A0, A1, A2, A3, A4, Z](f: F[(A0, A1, A2, A3, A4) ⇒ Z])(f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4]): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
ap6[A0, A1, A2, A3, A4, A5, Z](f: F[(A0, A1, A2, A3, A4, A5) ⇒ Z])(f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5]): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
ap7[A0, A1, A2, A3, A4, A5, A6, Z](f: F[(A0, A1, A2, A3, A4, A5, A6) ⇒ Z])(f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6]): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
ap8[A0, A1, A2, A3, A4, A5, A6, A7, Z](f: F[(A0, A1, A2, A3, A4, A5, A6, A7) ⇒ Z])(f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7]): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
ap9[A0, A1, A2, A3, A4, A5, A6, A7, A8, Z](f: F[(A0, A1, A2, A3, A4, A5, A6, A7, A8) ⇒ Z])(f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8]): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
as[A, B](fa: F[A], b: B): F[B]
- Definition Classes
- Functor
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
attempt[A](fa: F[A]): F[Either[Throwable, A]]
- Definition Classes
- ApplicativeError
-
def
attemptT[A](fa: F[A]): EitherT[F, Throwable, A]
- Definition Classes
- ApplicativeError
-
def
catchNonFatal[A](a: ⇒ A)(implicit ev: <:<[Throwable, Throwable]): F[A]
- Definition Classes
- ApplicativeError
-
def
catchNonFatalEval[A](a: Eval[A])(implicit ev: <:<[Throwable, Throwable]): F[A]
- Definition Classes
- ApplicativeError
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
compose[G[_]](implicit arg0: Applicative[G]): Applicative[[α]F[G[α]]]
- Definition Classes
- Applicative
-
def
compose[G[_]](implicit arg0: Apply[G]): Apply[[α]F[G[α]]]
- Definition Classes
- Apply
-
def
compose[G[_]](implicit arg0: Functor[G]): Functor[[α]F[G[α]]]
- Definition Classes
- Functor
-
def
compose[G[_]](implicit arg0: Invariant[G]): Invariant[[α]F[G[α]]]
- Definition Classes
- Invariant
-
def
composeApply[G[_]](implicit arg0: Apply[G]): InvariantSemigroupal[[α]F[G[α]]]
- Definition Classes
- InvariantSemigroupal
-
def
composeContravariant[G[_]](implicit arg0: Contravariant[G]): Contravariant[[α]F[G[α]]]
- Definition Classes
- Functor → Invariant
-
def
composeContravariantMonoidal[G[_]](implicit arg0: ContravariantMonoidal[G]): ContravariantMonoidal[[α]F[G[α]]]
- Definition Classes
- Applicative
-
def
composeFunctor[G[_]](implicit arg0: Functor[G]): Invariant[[α]F[G[α]]]
- Definition Classes
- Invariant
-
def
delay[A](thunk: ⇒ A): F[A]
Lifts any by-name parameter into the
F
context.Lifts any by-name parameter into the
F
context.Equivalent to
Applicative.pure
for pure expressions, the purpose of this function is to suspend side effects inF
.- Definition Classes
- Sync
-
def
ensure[A](fa: F[A])(error: ⇒ Throwable)(predicate: (A) ⇒ Boolean): F[A]
- Definition Classes
- MonadError
-
def
ensureOr[A](fa: F[A])(error: (A) ⇒ Throwable)(predicate: (A) ⇒ Boolean): F[A]
- Definition Classes
- MonadError
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
flatTap[A, B](fa: F[A])(f: (A) ⇒ F[B]): F[A]
- Definition Classes
- FlatMap
-
def
flatten[A](ffa: F[F[A]]): F[A]
- Definition Classes
- FlatMap
-
final
def
fmap[A, B](fa: F[A])(f: (A) ⇒ B): F[B]
- Definition Classes
- Functor
-
def
fproduct[A, B](fa: F[A])(f: (A) ⇒ B): F[(A, B)]
- Definition Classes
- Functor
-
def
fromEither[A](x: Either[Throwable, A]): F[A]
- Definition Classes
- ApplicativeError
-
def
fromTry[A](t: Try[A])(implicit ev: <:<[Throwable, Throwable]): F[A]
- Definition Classes
- ApplicativeError
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
handleError[A](fa: F[A])(f: (Throwable) ⇒ A): F[A]
- Definition Classes
- ApplicativeError
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
ifM[B](fa: F[Boolean])(ifTrue: ⇒ F[B], ifFalse: ⇒ F[B]): F[B]
- Definition Classes
- FlatMap
-
def
imap[A, B](fa: F[A])(f: (A) ⇒ B)(g: (B) ⇒ A): F[B]
- Definition Classes
- Functor → Invariant
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
iterateUntil[A](f: F[A])(p: (A) ⇒ Boolean): F[A]
- Definition Classes
- Monad
-
def
iterateUntilM[A](init: A)(f: (A) ⇒ F[A])(p: (A) ⇒ Boolean): F[A]
- Definition Classes
- Monad
-
def
iterateWhile[A](f: F[A])(p: (A) ⇒ Boolean): F[A]
- Definition Classes
- Monad
-
def
iterateWhileM[A](init: A)(f: (A) ⇒ F[A])(p: (A) ⇒ Boolean): F[A]
- Definition Classes
- Monad
-
def
lift[A, B](f: (A) ⇒ B): (F[A]) ⇒ F[B]
- Definition Classes
- Functor
-
def
liftIO[A](ioa: IO[A]): F[A]
Inherited from LiftIO, defines a conversion from IO in terms of the
Concurrent
type class.Inherited from LiftIO, defines a conversion from IO in terms of the
Concurrent
type class.N.B. expressing this conversion in terms of
Concurrent
and its capabilities means that the resultingF
is cancelable in case the sourceIO
is.To access this implementation as a standalone function, you can use Concurrent.liftIO (on the object companion).
- Definition Classes
- Concurrent → Async → LiftIO
-
def
map[A, B](fa: F[A])(f: (A) ⇒ B): F[B]
- Definition Classes
- Monad → Applicative → Functor
-
def
map10[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9])(f: (A0, A1, A2, A3, A4, A5, A6, A7, A8, A9) ⇒ Z): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
map11[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10])(f: (A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10) ⇒ Z): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
map12[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11])(f: (A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11) ⇒ Z): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
map13[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12])(f: (A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12) ⇒ Z): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
map14[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12], f13: F[A13])(f: (A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13) ⇒ Z): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
map15[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12], f13: F[A13], f14: F[A14])(f: (A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14) ⇒ Z): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
map16[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12], f13: F[A13], f14: F[A14], f15: F[A15])(f: (A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15) ⇒ Z): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
map17[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12], f13: F[A13], f14: F[A14], f15: F[A15], f16: F[A16])(f: (A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16) ⇒ Z): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
map18[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12], f13: F[A13], f14: F[A14], f15: F[A15], f16: F[A16], f17: F[A17])(f: (A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17) ⇒ Z): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
map19[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12], f13: F[A13], f14: F[A14], f15: F[A15], f16: F[A16], f17: F[A17], f18: F[A18])(f: (A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18) ⇒ Z): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
map2[A, B, Z](fa: F[A], fb: F[B])(f: (A, B) ⇒ Z): F[Z]
- Definition Classes
- Apply
-
def
map20[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12], f13: F[A13], f14: F[A14], f15: F[A15], f16: F[A16], f17: F[A17], f18: F[A18], f19: F[A19])(f: (A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19) ⇒ Z): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
map21[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12], f13: F[A13], f14: F[A14], f15: F[A15], f16: F[A16], f17: F[A17], f18: F[A18], f19: F[A19], f20: F[A20])(f: (A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20) ⇒ Z): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
map22[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12], f13: F[A13], f14: F[A14], f15: F[A15], f16: F[A16], f17: F[A17], f18: F[A18], f19: F[A19], f20: F[A20], f21: F[A21])(f: (A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21) ⇒ Z): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
map2Eval[A, B, Z](fa: F[A], fb: Eval[F[B]])(f: (A, B) ⇒ Z): Eval[F[Z]]
- Definition Classes
- Apply
-
def
map3[A0, A1, A2, Z](f0: F[A0], f1: F[A1], f2: F[A2])(f: (A0, A1, A2) ⇒ Z): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
map4[A0, A1, A2, A3, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3])(f: (A0, A1, A2, A3) ⇒ Z): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
map5[A0, A1, A2, A3, A4, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4])(f: (A0, A1, A2, A3, A4) ⇒ Z): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
map6[A0, A1, A2, A3, A4, A5, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5])(f: (A0, A1, A2, A3, A4, A5) ⇒ Z): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
map7[A0, A1, A2, A3, A4, A5, A6, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6])(f: (A0, A1, A2, A3, A4, A5, A6) ⇒ Z): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
map8[A0, A1, A2, A3, A4, A5, A6, A7, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7])(f: (A0, A1, A2, A3, A4, A5, A6, A7) ⇒ Z): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
map9[A0, A1, A2, A3, A4, A5, A6, A7, A8, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8])(f: (A0, A1, A2, A3, A4, A5, A6, A7, A8) ⇒ Z): F[Z]
- Definition Classes
- ApplyArityFunctions
-
def
mproduct[A, B](fa: F[A])(f: (A) ⇒ F[B]): F[(A, B)]
- Definition Classes
- FlatMap
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
onError[A](fa: F[A])(pf: PartialFunction[Throwable, F[Unit]]): F[A]
- Definition Classes
- ApplicativeError
-
def
point[A](a: A): F[A]
- Definition Classes
- InvariantMonoidal
-
def
product[A, B](fa: F[A], fb: F[B]): F[(A, B)]
- Definition Classes
- FlatMap → Apply → Semigroupal
-
def
productL[A, B](fa: F[A])(fb: F[B]): F[A]
- Definition Classes
- Apply
-
def
productLEval[A, B](fa: F[A])(fb: Eval[F[B]]): F[A]
- Definition Classes
- FlatMap
-
def
productR[A, B](fa: F[A])(fb: F[B]): F[B]
- Definition Classes
- Apply
-
def
productREval[A, B](fa: F[A])(fb: Eval[F[B]]): F[B]
- Definition Classes
- FlatMap
-
def
race[A, B](fa: F[A], fb: F[B]): F[Either[A, B]]
Run two tasks concurrently and return the first to finish, either in success or error.
Run two tasks concurrently and return the first to finish, either in success or error. The loser of the race is cancelled.
The two tasks are potentially executed in parallel, the winner being the first that signals a result.
As an example, this would be the implementation of a "timeout" operation:
import cats.effect._ import scala.concurrent.duration._ def timeoutTo[F[_], A](fa: F[A], after: FiniteDuration, fallback: F[A]) (implicit F: Concurrent[F], timer: Timer[F]): F[A] = { F.race(fa, timer.sleep(timer)).flatMap { case Left((a, _)) => F.pure(a) case Right((_, _)) => fallback } } def timeout[F[_], A](fa: F[A], after: FiniteDuration) (implicit F: Concurrent[F], timer: Timer[F]): F[A] = { timeoutTo(fa, after, F.raiseError(new TimeoutException(after.toString))) }
Also see racePair for a version that does not cancel the loser automatically on successful results.
- Definition Classes
- Concurrent
-
def
recover[A](fa: F[A])(pf: PartialFunction[Throwable, A]): F[A]
- Definition Classes
- ApplicativeError
-
def
recoverWith[A](fa: F[A])(pf: PartialFunction[Throwable, F[A]]): F[A]
- Definition Classes
- ApplicativeError
-
def
replicateA[A](n: Int, fa: F[A]): F[List[A]]
- Definition Classes
- Applicative
-
def
rethrow[A](fa: F[Either[Throwable, A]]): F[A]
- Definition Classes
- MonadError
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
tuple10[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9]): F[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9)]
- Definition Classes
- ApplyArityFunctions
-
def
tuple11[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10]): F[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10)]
- Definition Classes
- ApplyArityFunctions
-
def
tuple12[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11]): F[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11)]
- Definition Classes
- ApplyArityFunctions
-
def
tuple13[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12]): F[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12)]
- Definition Classes
- ApplyArityFunctions
-
def
tuple14[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12], f13: F[A13]): F[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13)]
- Definition Classes
- ApplyArityFunctions
-
def
tuple15[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12], f13: F[A13], f14: F[A14]): F[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14)]
- Definition Classes
- ApplyArityFunctions
-
def
tuple16[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12], f13: F[A13], f14: F[A14], f15: F[A15]): F[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15)]
- Definition Classes
- ApplyArityFunctions
-
def
tuple17[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12], f13: F[A13], f14: F[A14], f15: F[A15], f16: F[A16]): F[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16)]
- Definition Classes
- ApplyArityFunctions
-
def
tuple18[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12], f13: F[A13], f14: F[A14], f15: F[A15], f16: F[A16], f17: F[A17]): F[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17)]
- Definition Classes
- ApplyArityFunctions
-
def
tuple19[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12], f13: F[A13], f14: F[A14], f15: F[A15], f16: F[A16], f17: F[A17], f18: F[A18]): F[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18)]
- Definition Classes
- ApplyArityFunctions
-
def
tuple2[A, B](f1: F[A], f2: F[B]): F[(A, B)]
- Definition Classes
- ApplyArityFunctions
-
def
tuple20[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12], f13: F[A13], f14: F[A14], f15: F[A15], f16: F[A16], f17: F[A17], f18: F[A18], f19: F[A19]): F[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19)]
- Definition Classes
- ApplyArityFunctions
-
def
tuple21[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12], f13: F[A13], f14: F[A14], f15: F[A15], f16: F[A16], f17: F[A17], f18: F[A18], f19: F[A19], f20: F[A20]): F[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20)]
- Definition Classes
- ApplyArityFunctions
-
def
tuple22[A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8], f9: F[A9], f10: F[A10], f11: F[A11], f12: F[A12], f13: F[A13], f14: F[A14], f15: F[A15], f16: F[A16], f17: F[A17], f18: F[A18], f19: F[A19], f20: F[A20], f21: F[A21]): F[(A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, A21)]
- Definition Classes
- ApplyArityFunctions
-
def
tuple3[A0, A1, A2, Z](f0: F[A0], f1: F[A1], f2: F[A2]): F[(A0, A1, A2)]
- Definition Classes
- ApplyArityFunctions
-
def
tuple4[A0, A1, A2, A3, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3]): F[(A0, A1, A2, A3)]
- Definition Classes
- ApplyArityFunctions
-
def
tuple5[A0, A1, A2, A3, A4, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4]): F[(A0, A1, A2, A3, A4)]
- Definition Classes
- ApplyArityFunctions
-
def
tuple6[A0, A1, A2, A3, A4, A5, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5]): F[(A0, A1, A2, A3, A4, A5)]
- Definition Classes
- ApplyArityFunctions
-
def
tuple7[A0, A1, A2, A3, A4, A5, A6, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6]): F[(A0, A1, A2, A3, A4, A5, A6)]
- Definition Classes
- ApplyArityFunctions
-
def
tuple8[A0, A1, A2, A3, A4, A5, A6, A7, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7]): F[(A0, A1, A2, A3, A4, A5, A6, A7)]
- Definition Classes
- ApplyArityFunctions
-
def
tuple9[A0, A1, A2, A3, A4, A5, A6, A7, A8, Z](f0: F[A0], f1: F[A1], f2: F[A2], f3: F[A3], f4: F[A4], f5: F[A5], f6: F[A6], f7: F[A7], f8: F[A8]): F[(A0, A1, A2, A3, A4, A5, A6, A7, A8)]
- Definition Classes
- ApplyArityFunctions
-
def
tupleLeft[A, B](fa: F[A], b: B): F[(B, A)]
- Definition Classes
- Functor
-
def
tupleRight[A, B](fa: F[A], b: B): F[(A, B)]
- Definition Classes
- Functor
-
def
unit: F[Unit]
- Definition Classes
- Applicative → InvariantMonoidal
-
def
unlessA[A](cond: Boolean)(f: ⇒ F[A]): F[Unit]
- Definition Classes
- Applicative
-
def
untilM[G[_], A](f: F[A])(cond: ⇒ F[Boolean])(implicit G: Alternative[G]): F[G[A]]
- Definition Classes
- Monad
-
def
untilM_[A](f: F[A])(cond: ⇒ F[Boolean]): F[Unit]
- Definition Classes
- Monad
-
def
void[A](fa: F[A]): F[Unit]
- Definition Classes
- Functor
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
whenA[A](cond: Boolean)(f: ⇒ F[A]): F[Unit]
- Definition Classes
- Applicative
-
def
whileM[G[_], A](p: F[Boolean])(body: ⇒ F[A])(implicit G: Alternative[G]): F[G[A]]
- Definition Classes
- Monad
-
def
whileM_[A](p: F[Boolean])(body: ⇒ F[A]): F[Unit]
- Definition Classes
- Monad
-
def
widen[A, B >: A](fa: F[A]): F[B]
- Definition Classes
- Functor
Deprecated Value Members
-
final
def
followedBy[A, B](fa: F[A])(fb: F[B]): F[B]
- Definition Classes
- Apply
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 1.0.0-RC2) Use *> or productR instead.
-
def
followedByEval[A, B](fa: F[A])(fb: Eval[F[B]]): F[B]
- Definition Classes
- FlatMap
- Annotations
- @deprecated
- Deprecated
(Since version 1.0.0-RC2) Use productREval instead.
-
final
def
forEffect[A, B](fa: F[A])(fb: F[B]): F[A]
- Definition Classes
- Apply
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 1.0.0-RC2) Use <* or productL instead.
-
def
forEffectEval[A, B](fa: F[A])(fb: Eval[F[B]]): F[A]
- Definition Classes
- FlatMap
- Annotations
- @deprecated
- Deprecated
(Since version 1.0.0-RC2) Use productLEval instead.