<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 20 Jun, 2008, at 23:53, YC wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi - <br><br>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?<br><br><div style="margin-left: 40px; font-family: courier new,monospace;"> > (define sym (gensym))<br> > sym<br> g30043<br> > (equal? sym 'g30043)<br> #f<br>> (equal? 'g30043 'g30043) <br> #t<br></div> <br></blockquote><br></div><div>The purpose of gensym is to create an uninterned symbol, that no one can produce again. Normally a symbol that is read is interned and everytime a symbol with the same name is read, the same symbol is returned. So that is the desired behaviour.</div><div><br></div><div>I don't know if there's a way to intern a "gensymmed" symbol, but you could hammer it by creating you own gensym that would use string->symbol and a counter you had.</div><div><br></div><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div> - Filipe Cabecinhas</div><div><br class="webkit-block-placeholder"></div></div></div></span></span></div></span><br class="Apple-interchange-newline"> </div><br></body></html>