async
Translation status: English reader-locale proof. Term names and code fences follow the en pack; supporting prose may still be English.
Callable posture for asynchronous finite functions.
Aliases: async
Syntax: fn name(…) async → T
Category#
async
Related#
Examples#
radix/corpus/fiet/fiet.fab (canonical · keyword)#
Callable posture for asynchronous finite functions.
# =============================================================================
# async — Asynchronous finite callable posture
# =============================================================================
#
# What this teaches:
# • Preferred async posture word after the parameter list: `async → T`.
# • Return type is observed as `promise<T>` at call sites.
# • Consume with `await_const`, `await_var`, `return_await`, or `await`.
#
# Common mistakes:
# • Using bare `yield` to await — await is not yield; use await morphology.
#
# See also: future, promise, await_const, await
# =============================================================================
# GRAMMAR:
# callablePosture :← 'async'
#
# EXPECTED OUTPUT:
# 42
fn responde() async → int {
return 42
}
async_main {
await_const _ responsum ← responde()
print responsum
}Expected output:
42