package async_kernel
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha256=01ced973dbc70535f692f38bed524ae82dba17e26e58791b2fbf0d647b160d2e
    
    
  doc/async_kernel.eager_deferred/Eager_deferred/index.html
Module Eager_deferredSource
include S with type 'a t := 'a Async_kernel.Deferred.t
include Async_kernel.Invariant.S1 with type 'a t := 'a Async_kernel.Deferred.t
include Core.Monad with type 'a t := 'a Async_kernel.Deferred.t
val (>>=) : 
  'a Async_kernel.Deferred.t ->
  ('a -> 'b Async_kernel.Deferred.t) ->
  'b Async_kernel.Deferred.tt >>= f returns a computation that sequences the computations represented by two monad elements. The resulting computation first does t to yield a value v, and then runs the computation returned by f v.
t >>| f is t >>= (fun a -> return (f a)).
val bind : 
  'a Async_kernel.Deferred.t ->
  f:('a -> 'b Async_kernel.Deferred.t) ->
  'b Async_kernel.Deferred.tbind t ~f = t >>= f
return v returns the (trivial) computation that returns v.
map t ~f is t >>| f.
join t is t >>= (fun t' -> t').
ignore_m t is map t ~f:(fun _ -> ()). ignore_m used to be called ignore, but we decided that was a bad name, because it shadowed the widely used Stdlib.ignore. Some monads still do let ignore = ignore_m for historical reasons.
Like all, but ensures that every monadic value in the list produces a unit value, all of which are discarded rather than being collected into a list.
These are convenient to have in scope when programming with a monad:
val both : 
  'a Async_kernel.Deferred.t ->
  'b Async_kernel.Deferred.t ->
  ('a * 'b) Async_kernel.Deferred.tval repeat_until_finished : 
  'state ->
  ('state ->
    [ `Repeat of 'state | `Finished of 'result ] Async_kernel.Deferred.t) ->
  'result Async_kernel.Deferred.tmodule List : 
  Async_kernel.Monad_sequence.S
    with type 'a monad := 'a Async_kernel.Deferred.t
    with type 'a t := 'a listmodule Queue : 
  Async_kernel.Monad_sequence.S
    with type 'a monad := 'a Async_kernel.Deferred.t
    with type 'a t := 'a Core.Queue.tSimilar to Deferred.Queue but eager when passing ~how:`Sequential. The functions in Queue raise if the queue is mutated during execution.
module Memo : 
  Async_kernel.Deferred.Memo.S
    with type 'a deferred := 'a Async_kernel.Deferred.t