#wscript: functions and closures_fn definitions, function values as parameters, and closures that capture by reference._```rustfnarea(w: int, h: int)-> int{ w * h }fnapply(f:fn(int)-> int, x: int)-> int{f(x)}letdouble=|x|x *2// closures capture by reference
```Functions are first-class: a `fn(int) -> int` type annotates a function parameter, and closures (`|x| …`) capture their environment by reference.
##Related-[wscript: overview](../references/concept_wscript_overview.md)-[wscript: structs, enums, methods](../references/concept_wscript_structs_enums.md)[← Back to SKILL.md](../SKILL.md)