Skip to main content

Asynchronous

Symmetry of asynchronous computations.

Async function#

Symbol: -->
Translated to JavaScript async function

= getUserPosts --> user
database.loadPosts user.postIds

Await#

Symbol: <--
Translated to JavaScript await

= checkIfUserIsAdmin --> userId
= user <-- (database.loadUserAsync userId)
== user.role 'admin'

You can have multiple lines of code in this operator:

= value <--
= a 1
= (: b) <-- (getAsync a)
b