Course of Raku / Functional, concurrent, reactive, and web programming / Concurrent programming / Promises / Exercises

Chain a promise

Problem

Start a promise that produces the string 'raku'. Using .then, chain a follow-up that upper-cases it (read the value with .result), then chain a second .then that appends an exclamation mark. Await the final promise and print its value.

Example

The program prints:

RAKU!

Solution

See the solution

Course navigation

Vows 🆕   |   Solution: Chain a promise