[plt-scheme] identifier-binding question

From: Jos Koot (jos.koot at telefonica.net)
Date: Thu Jan 8 06:26:11 EST 2009

See below:

#lang scheme
(define-syntax (x stx)
 (syntax-case stx ()
  ((_ y)
   (let ((x (identifier-binding #'y)))
    (cond
     ((list? x) #''module)
      ((not x) #''top)
      ((eq? x 'lexical) #''lexical)
      (else #''unexpected))))))
(x b) ; --> #f <== I expected `module' ???
(define b 3)
(x b) ; --> module

Thanks, Jos

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20090108/0948a11d/attachment.html>

Posted on the users mailing list.