[plt-scheme] gensym & comparison
The idea of gensym is to generate symbol that is not eq? to any other
symbol. So I don't know what you are asking here. You can always convert
symbol->string, and then compare string, but that's something against
the reason to have gensym.
Chongkai
YC wrote:
> Hi -
>
> Is there a way to compare gensym symbols with a manually created
> symbol, short of converting them to strings? It's okay if not - just
> want to know the reason that they cannot be compared?
>
> > (define sym (gensym))
> > sym
> g30043
> > (equal? sym 'g30043)
> #f
> > (equal? 'g30043 'g30043)
> #t
>
> Thanks,
> yc
>