العرضar

انتظر_ثابت

Translation status: العربية reader-locale proof. Term names and code fences follow the ar pack; supporting prose may still be English.

Awaits a وعد and binds an immutable name.

Aliases: await_const

Syntax: انتظر_ثابت T name ← future

Category#

async

Examples#

radix/corpus/figendum/figendum.fab (canonical · keyword)#

Awaits a وعد and binds an immutable name.

# =============================================================================
# انتظر_ثابت — Await-bind immutable
# =============================================================================
#
# What this teaches:
#   • Await a `وعد<T>` and bind the success value immutably.
#   • Valid in `غيرمتزامن` / `مولد_غيرمتزامن` / `استهلال` contexts.
#
# See also: انتظر_متغير, انتظر, أعد_منتظرا, غيرمتزامن, وعد
# =============================================================================

# GRAMMAR:
#   awaitBind :← 'انتظر_ثابت' type? IDENT '←' expr

دالة responde() غيرمتزامن → عدد {
    أعد 7
}

استهلال {
    انتظر_ثابت عدد responsum ← responde()
    اعرض responsum
}

Expected output:

7