Files
RustAst/examples/hof.myc
T

11 lines
191 B
Plaintext

;; Higher-Order Function Example
;; Benchmark: 56ns
;; Benchmark-Repeat: 36342
;; Output: 25
(do
(def apply (fn [f x] (f x)))
(def square (fn [x] (* x x)))
(apply square 5)
)