diff options
author | Eduardo Julian | 2017-07-22 13:59:38 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-07-22 13:59:38 -0400 |
commit | 337158b78b5f42a6b9fc46ae367d3179a944d8bb (patch) | |
tree | 68a683396eb62096ea6118a4032a7992975866c3 /stdlib/source/lux/concurrency/task.lux | |
parent | 5824d2c5b09889c3b0314694c4069c234bd992cf (diff) |
- Some utility functions.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/concurrency/task.lux | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/stdlib/source/lux/concurrency/task.lux b/stdlib/source/lux/concurrency/task.lux index 6f880ef79..9fc35ee5f 100644 --- a/stdlib/source/lux/concurrency/task.lux +++ b/stdlib/source/lux/concurrency/task.lux @@ -73,3 +73,7 @@ (task Unit))} (wrap (list (` (: (;;Task (~ type)) (P;promise' #;None)))))) + +(def: #export (from-promise promise) + (All [a] (-> (P;Promise a) (Task a))) + (:: P;Functor<Promise> map (|>. #R;Success) promise)) |