ไม่เปลี่ยนแปลง
Translation status: ภาษาไทย reader-locale proof. Term names and code fences follow the th-TH pack; supporting prose may still be English.
Marks a function as non-mutating.
Syntax: ฟังก์ชัน <name>(...) ไม่เปลี่ยนแปลง → <type>
Category#
function
Related#
Examples#
radix/corpus/immutata/immutata.fab (canonical · keyword)#
Marks a function as non-mutating.
# =============================================================================
# ไม่เปลี่ยนแปลง — Marks a function as non-mutating
# =============================================================================
#
# What this teaches:
# • Marks a function as non-mutating.
# • Related keywords: โยนผล
#
# Common mistakes:
# • Mutating state inside an `ไม่เปลี่ยนแปลง` function — `ไม่เปลี่ยนแปลง` is a non-mutation contract; modifying `ใน` parameters or external state breaks the contract.
#
# See also: โยนผล
# =============================================================================
# ไม่เปลี่ยนแปลง — immutability contract on ฟังก์ชัน
#
# GRAMMAR:
# funcModifier :← 'ไม่เปลี่ยนแปลง'
#
# EXPECTED OUTPUT:
# No เริ่ม — declaration or test-runner surface only.
#
# BACKEND:
# declaration-only function modifier (whitelist: ไม่เปลี่ยนแปลง/immutata.fab).
#
fn inspecta() readonly → int {
return 0
}