package b0
Software construction and deployment kit
Install
Dune Dependency
Authors
Maintainers
Sources
b0-0.0.3.tbz
sha512=d24b09eb520b8b91a1e5715badc9f5bcd6a6ec49c047f719a07afef6b835c128dc63e00c3be73d5353b037f4c3c9f2889e40666b30e297e872e4d011f098394c
doc/b0_b00_std/B00_std/Fut/index.html
Module B00_std.Fut
Future values.
A future is an undetermined value that becomes determined at an an arbitrary point in the future. The future acts as a placeholder for the value while it is undetermined.
Future values
val create : unit -> 'a t * ('a -> unit)
create ()
is (f, set)
with f
the future value and set
the function to set
it. The latter can be called only once, Invalid_argument
is raised otherwise.
val await : 'a t -> ('a -> unit) -> unit
await f k
waits for f
to be determined and continues with k v
with v
the value of the future. If the future never determines k
is not invoked. k
must not raise.
val value : 'a t -> 'a option
value f
is f
's value, if any.
val sync : 'a t -> 'a
sync f
waits for f
to determine. Warning. This is relaxed busy waiting.
val return : 'a -> 'a t
return v
is a future that determines v
.
of_list fs
determines with the values of all fs
, in the same order.
module Syntax : sig ... end
Future syntax.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page