If I understand it correctly, macros are meant to be first-class. This is how we can define a macro directly: (set foo (annotate 'mac (fn (x) x)))
If, let's go more basic: arc> (def id (x) x)
#<procedure: id>
arc> (set foo (annotate 'mac id))
#3(tagged mac #<procedure: id>)
arc> (foo 1)
1
Interestingly, if you show foo: arc> foo
#3(tagged mac #<procedure: id>)
Similarly: arc> (annotate 'mac id)
#3(tagged mac #<procedure: id>
Then.. how come this doesn't work? arc> ((annotate 'mac id) 1)
Error: "Function call on inappropriate object #3(tagged mac #<procedure: id>) (1)"
|