↢
Translation status: English reader-locale proof. Term names and code fences follow the en pack; supporting prose may still be English.
Awaits a promise while initializing an ordinary binding.
Syntax: const T name ↢ future
Category#
async
Related#
Examples#
radix/corpus/await-assignment/await-assignment.fab (canonical · operator)#
Awaits a promise while initializing an ordinary binding.
# =============================================================================
# ↢ — Await-directed binding initializer
# =============================================================================
#
# What this teaches:
# • Keep const, var, or let while awaiting the initializer.
# • The glyph is a binding boundary, not an inline expression operator.
# • A stored promise can be resolved in a later declaration.
#
# See also: await_const, await_var, async, promise
# =============================================================================
fn responde(int value) async → int {
return value
}
async_main {
const promise<int> todo ← responde(7)
const int immotum ↢ todo
var int mutabile ↢ responde(8)
const _ illatum ↢ responde(9)
mutabile ← mutabile + 1
print immotum
print mutabile
print illatum
}Expected output:
7
9
9