[plt-scheme] I don't understand libraries

From: Jon Stenerson (jonstenerson at comcast.net)
Date: Sun May 16 01:04:35 EDT 2010

Why does this print "foo" three times? I'm using drscheme and the module
language. Is lib being read three separate times when I press ctrl-t? Or
is foo being defined three times? Or what? I don't get it.

#!r6rs

(library (lib)

  (export x)
  (import (rnrs))
  (define x 0)
  
  (define-syntax foo (display "foo\n") )
)



Posted on the users mailing list.