Static variables
Static methods
staticasync<A>(f:A ‑> Void ‑> Void, lazy:Bool = false):Future<A>
Creates an async future
* Example: var i = Future.async(function(cb) cb(1)); // Future<Int>
staticofMany<A>(futures:Array<Future<A>>, gather:Bool = true):Future<Array<A>>
Merges multiple futures into Future
staticinlinesync<A>(v:A):Future<A>
Creates a sync future.
* Example: var i = Future.sync(1); // Future<Int>
Methods
inlineflatMap<A>(next:T ‑> Future<A>, gather:Bool = true):Future<A>
Creates a new future by applying a transform function to the result.
* Different from map
, the transform function of flatMap
returns a Future
inlinemap<A>(f:T ‑> A, gather:Bool = true):Future<A>
Creates a new future by applying a transform function to the result.
* Different from flatMap
, the transform function of map
returns a sync value