đợi_biến
Translation status: Tiếng Việt reader-locale proof. Term names and code fences follow the vi pack; supporting prose may still be English.
Awaits a lời_hứa and binds a mutable name.
Aliases: await_var
Syntax: đợi_biến T name ← future
Category#
async
Related#
Examples#
radix/corpus/variandum/variandum.fab (canonical · keyword)#
Awaits a lời_hứa and binds a mutable name.
# =============================================================================
# đợi_biến — Await-bind mutable
# =============================================================================
#
# What this teaches:
# • Await a `lời_hứa<T>` and bind the success value mutably.
#
# See also: đợi_hằng, đợi_bỏ, async, lời_hứa
# =============================================================================
hàm responde() async → số {
trả 3
}
bắt_đầu_bất_đồng_bộ {
đợi_biến số responsum ← responde()
responsum ← responsum + 1
ghi_chú responsum
}Expected output:
4