This is "bad syntax" for the same reason that `(map or '())` is "bad
syntax".
When the macro expander sees `(map y-coord points)`, it recognizes `map` as
a variable binding and then tries expanding each argument to `map`.
Expanding `y-coord` by itself leads to the error.

You could instead define `y-coord` as an identifier macro or just alias it
as a function. (As Daniel & Jos recommend.)

(define-syntax (y-coord stx) ;; Identifier macro
  (syntax-case stx ()
    [y-coord:id #'point-y]))

(define y-coord point-y) ;; Function


For details on the expander:
http://docs.racket-lang.org/reference/syntax-model.html#%28part._expand-steps%29

-- 
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.

Reply via email to