package async_kernel

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
include Core_kernel.Monad.S2 with type ('a, 'b) t = ('a, 'b) Core_kernel.Result.t Async_kernel__.Deferred1.t
type ('a, 'b) t
val (>>=) : ('a, 'e) t -> ('a -> ('b, 'e) t) -> ('b, 'e) t
val (>>|) : ('a, 'e) t -> ('a -> 'b) -> ('b, 'e) t
module Let_syntax : sig ... end
module Monad_infix : sig ... end
val bind : ('a, 'e) t -> f:('a -> ('b, 'e) t) -> ('b, 'e) t
val return : 'a -> ('a, 'b) t
val map : ('a, 'e) t -> f:('a -> 'b) -> ('b, 'e) t
val join : (('a, 'e) t, 'e) t -> ('a, 'e) t
val ignore_m : ('a, 'e) t -> (unit, 'e) t
val all : ('a, 'e) t list -> ('a list, 'e) t
val all_unit : (unit, 'e) t list -> (unit, 'e) t
val all_ignore : (unit, 'e) t list -> (unit, 'e) t
  • deprecated [since 2018-02] Use [all_unit]
val ignore : (_, 'err) t -> (unit, 'err) t
val fail : 'err -> (_, 'err) t
val failf : ('a, unit, string, (_, string) t) Core_kernel.format4 -> 'a

e.g., failf "Couldn't find bloogle %s" (Bloogle.to_string b).

val map_error : ('ok, 'error1) t -> f:('error1 -> 'error2) -> ('ok, 'error2) t
val combine : ('ok1, 'err) t -> ('ok2, 'err) t -> ok:('ok1 -> 'ok2 -> 'ok3) -> err:('err -> 'err -> 'err) -> ('ok3, 'err) t

combine waits on both inputs and combines their results using Result.combine.

OCaml

Innovation. Community. Security.