The `free-vars` function relies on the binding information added by the macro expander during the expansion process. More precisely, only identifiers whose `identifier-binding` information is `'lexical` are included. All the identifiers you expected to see instead have no binding information -- they're unbound and `identifier-binding` will produce #f.
To use `free-vars` usefully, the input needs to be the result of either `expand` or `local-expand`. Sam On Tue, Apr 7, 2015 at 3:52 AM Byron Davies <byrondav...@starshine.us> wrote: > I don't understand the free-vars function > http://docs.racket-lang.org/syntax/syntax-helpers.html#%28def._%28%28lib._syntax%2Ffree-vars..rkt%29._free-vars%29%29 > > For example, I would expect (free-vars #'foo) to be (list #'foo), and > (free-vars #'(#%plain-lambda (foo) bar)) to be (list #'bar), but both are > '(). > > Can someone explain my dashed expectations? > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.