[plt-scheme] HtDP -- Looking for gensym function

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Fri Sep 11 09:07:32 EDT 2009

On Sep 10, 2009, at 10:57 PM, Gadfly wrote:

> Hi All --
>
> The gensym function, required for HtDP exercise 32.1.3, isn't
> available.

Thanks for the bug report.



> In the past, once group member advised --
>
> You can write a teachpack that provides gensym and add it to your ISL
> or ASL program.
>
> The teachpack itself would be written in the module language and look
> like:
>
> #lang scheme
> (provide gensym)
>
> Save this file somewhere, then go to Language > Add Teachpack ... >
> Add Teachpack to List... and select this file. --
>
> I tried this and it didn't work. Any suggestions?


I can't repeat the bug. I saved the above as "foo.ss" and tried two
things:

1. set foo as a teacpack and then add

   (gensym 'a)

to the file.

2. require foo manually like this:

   (require "foo.ss")
   (gensym 'a)

In both cases, the gensym worked fine and produce a symbol.

> Welcome to DrScheme, version 4.2.1.8-svn11sep2009 [3m].
> Language: Advanced Student custom; memory limit: 256 megabytes.
> Teachpack: foo.ss.
> 'a1117
> This program should be tested.
> >

-- Matthias



Posted on the users mailing list.