[racket] enter! not working?

From: Brad Long (brad at longbrothers.net)
Date: Sun Jun 27 08:06:52 EDT 2010

I am using DrRacket Version 5 on Windows. When I follow the example (see 
below) and get to the part where I am suppposed to use "enter!", I get this 

reference to an identifier before its definition: enter!

Thanks for any help.


===> START

#lang racket

  (define (extract str)
    (substring str 4 7))

If calling (extract "the boy") is part of the main action of your program, 
that would go in the definitions area, too. But if it was just an example 
expression that you were using to explore extract, then you'd more likely 
leave the definitions area as above, click Run, and then evaluate (extract 
"the boy") in the REPL.

With racket, you'd save the above text in a file using your favorite editor. 
If you save it as "extract.rkt", then after starting racket in the same 
directory, you'd evaluate the following sequence:

  > (enter! "extract.rkt")
  > (extract "the gal out of the city")


The enter! form both loads the code and switches the evaluation context to 
the inside of the module, just like DrRacket's Run button.

=====> END

Posted on the users mailing list.