Files
RustAst/examples/macro_splice.myc
T

10 lines
220 B
Plaintext

;; Benchmark: 136ns
;; Benchmark-Repeat: 14587
;; Macro Splicing example
;; Demonstrates unrolling a list into another list.
;; Output: [0 1 2 3 4]
(do
(macro wrap [items] `[0 ~@items 4])
(wrap [1 2 3]))