I think they are macro bindings that are actually structures with prop:procedure functions, so that the app macro (like 'special') below, can check where they came from.<div><br></div><div><div>#lang racket</div><div>
<br></div><div>(struct example (f x)</div><div> #:property</div><div> prop:procedure</div><div> (λ (e y)</div><div> ((example-f e) (example-x e) y)))</div><div><br></div><div>(define a (example + 4))</div>
<div><br></div><div>(a 5)</div><div><br></div><div>(begin-for-syntax</div><div> (require racket/list)</div><div> (struct macro-example (f x)</div><div> #:property</div><div> prop:procedure</div><div> (λ (e y)</div>
<div> ((macro-example-f e) </div><div> (macro-example-x e)</div><div> y))))</div><div><br></div><div>(define-syntax macro-a </div><div> (macro-example </div><div> (λ (now then)</div><div>
#`(+ #,now #,@(rest (syntax->list then))))</div><div> #'4))</div><div><br></div><div>(macro-a 5)</div><div><br></div><div>(define-syntax (special stx)</div><div> (syntax-case stx ()</div><div> [(_ f e)</div>
<div> (macro-example? (syntax-local-value #'f (λ () #f)))</div><div> #'(f e)]</div><div> [_</div><div> #'42]))</div><div><br></div><div>(special macro-a 5)</div><div>(special a 5)</div></div><div>
<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 5, 2012 at 6:49 AM, Grant Rettke <span dir="ltr"><<a href="mailto:grettke@acm.org" target="_blank">grettke@acm.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><div class="gmail_extra"><div class="gmail_quote"><div class="im">On Mon, Nov 5, 2012 at 7:22 AM, Jay McCarthy <span dir="ltr"><<a href="mailto:jay.mccarthy@gmail.com" target="_blank">jay.mccarthy@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>every top-level define (like for 'f') has a special notation on it that says "I'm a function". Since 'a' doesn't have this, then the macro for app in BSL can throw an error.</div>
</blockquote><div><br></div></div><div>What Racket language feature is used to do that? </div></div><br>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Jay McCarthy <<a href="mailto:jay@cs.byu.edu" target="_blank">jay@cs.byu.edu</a>><br>Assistant Professor / Brigham Young University<br><a href="http://faculty.cs.byu.edu/~jay" target="_blank">http://faculty.cs.byu.edu/~jay</a><br>
<br>"The glory of God is Intelligence" - D&C 93<br>
</div>