lean4-htt/tests/lean/run/macro_macro.lean
2020-10-25 09:16:38 -07:00

9 lines
227 B
Text

macro mk_m id:ident v:str n:num c:char : command => `(macro $id:ident : term => `(fun (x : String) => x ++ $v ++ toString $n ++ toString $c))
mk_m foo "bla" 10 'a'
mk_m boo "hello" 3 'b'
#check foo "world"
#check boo "boo"