Course of Raku / Functional, concurrent, reactive, and web programming / Reactive programming / await / Exercises / Await a promise
Solution: Await a promise
Here is a possible solution to the task.
Code
my $p = start { 100 };
say await $p;🦋 You can find the source code in the file await-a-promise.raku.
Output
100Comments
startlaunches the work and returns a promise.awaitwaits for it and yields the result,100.