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.
#lang racket (struct example (f x) #:property prop:procedure (λ (e y) ((example-f e) (example-x e) y))) (define a (example + 4)) (a 5) (begin-for-syntax (require racket/list) (struct macro-example (f x) #:property prop:procedure (λ (e y) ((macro-example-f e) (macro-example-x e) y)))) (define-syntax macro-a (macro-example (λ (now then) #`(+ #,now #,@(rest (syntax->list then)))) #'4)) (macro-a 5) (define-syntax (special stx) (syntax-case stx () [(_ f e) (macro-example? (syntax-local-value #'f (λ () #f))) #'(f e)] [_ #'42])) (special macro-a 5) (special a 5) On Mon, Nov 5, 2012 at 6:49 AM, Grant Rettke <gret...@acm.org> wrote: > > On Mon, Nov 5, 2012 at 7:22 AM, Jay McCarthy <jay.mccar...@gmail.com>wrote: > >> 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. >> > > What Racket language feature is used to do that? > > -- Jay McCarthy <j...@cs.byu.edu> Assistant Professor / Brigham Young University http://faculty.cs.byu.edu/~jay "The glory of God is Intelligence" - D&C 93
____________________ Racket Users list: http://lists.racket-lang.org/users