package lwt
Promises and event-driven I/O
Install
dune-project
Dependency
Authors
Maintainers
Sources
6.0.0-alpha00.tar.gz
md5=8a88c5d5fcb01d179bbb12e6b6888dca
sha512=bfecd3fa0a3461a3368bd7724e2fce7a751ba3899d590d5b08bc4257b058ca34ec25de1a3ead6585528afe77c6ca6db1c3e2d2421d6a773c845ef091472d2ed9
doc/lwt/Lwt_result/index.html
Module Lwt_result
Source
Explicit error handling
This module provides helpers for values of type ('a, 'b) result Lwt.t
. The module is experimental and may change in the future.
catch x
behaves like return y
if x ()
evaluates to y
, and like fail e
if x ()
raises e
Lwt.both p_1 p_2
returns a promise that is pending until both promises p_1
and p_2
become resolved. If only p_1
is Error e
, the promise is resolved with Error e
, If only p_2
is Error e
, the promise is resolved with Error e
, If both p_1
and p_2
resolve with Error _
, the promise is resolved with the error that occurred first.
iter f r
is f v
if r
is a promise resolved with Ok v
, and Lwt.return_unit
otherwise.
iter_error f r
is f v
if r
is a promise resolved with Error v
, and Lwt.return_unit
otherwise.
Deprecated
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page