[plt-scheme] I don't understand libraries

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Sun May 16 08:41:42 EDT 2010

If you disable debugging, then it only prints once (at least in the
latest git-based version). Debugging is implemented by expanding the
program and then inserting instrumentation code and then re-expanding,
so that accounts for two of the prints, but I'm not sure where the
third is coming from.

But in general, in that program, you are going to get one print each
time it is expanded.


On Sun, May 16, 2010 at 12:04 AM, Jon Stenerson
<jonstenerson at comcast.net> wrote:
> 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") )
> )
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Posted on the users mailing list.