Thank you Eric & Pierpaolo. I do, indeed, mean interned symbols, thus,
gensym is not what I want. I thought I was just unable to find the Racket
function for this, but apparently it really does not exist.

Marco
On Jan 15, 2014 2:59 AM, "Pierpaolo Bernardi" <[email protected]> wrote:

> On Wed, Jan 15, 2014 at 8:43 AM, Eric Dobson <[email protected]>
> wrote:
> > I'm not sure what you mean by random, but does gensym do what you want?
>
> I think Marco means interned. Gensym produces uninterned symbols.
>
> AFAIK, and checking briefly the manual, there doesn't seem to exists a
> single function to do this.
> But it is easy to cobble up something.
>
> (define gensym-intern
>   (let ((k 0))
>     (λ ((base "gensym-"))
>       (set! k (add1 k))
>       (string->symbol (format "~a~a" base k)))))
>
____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to