/* Simple Function Examples */ ..out "=== Functions: Computational Building Blocks ==="; /* Basic function composition */ add_five : x -> x + 5; double : x -> x * 2; result1 : double (add_five 10); ..assert result1 = 30; ..out "Composition: double(add_five(10)) = 30"; /* Higher-order function */ apply_twice : f x -> f (f x); increment : x -> x + 1; result2 : apply_twice @increment 5; ..assert result2 = 7; ..out "Apply twice: increment(increment(5)) = 7"; /* Function returning function */ make_adder : n -> x -> x + n; add_ten : make_adder 10; result3 : add_ten 25; ..assert result3 = 35; ..out "Function factory: add_ten(25) = 35"; ..out "---"; ..out "✅ Functions enable modular computation";