Cool, thanks!<div><br></div><div>Another quesiton on define-type -- is there anyway to get back an unique identifier for the type?</div><div><br></div><div>i.e. if I have:</div><div><br></div><div>(define f1 (make-foo ..))</div>
<div>(define f2 (make-foo ...))</div><div><br></div><div>(define b1 (make-bar ..)))</div><div><br></div><div>I want something so that</div><div><br></div><div>(equal? (type f1) (type f2)) and</div><div>(not (equal? (type f1) (type b1)))</div>
<div><br></div><div>the idea is then, I can do dispatching on types i.e.</div><div><br></div><div>(define (draw object)</div><div>  ((lookup-in-hash-table (type object)) object))</div><div><br></div><div>Thanks!</div><div>
<br><div class="gmail_quote">On Wed, May 27, 2009 at 5:14 AM, David St-Hilaire <span dir="ltr"><<a href="mailto:sthilaid@iro.umontreal.ca">sthilaid@iro.umontreal.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">lowly coder wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hey,<br>
<br>
  Where is define-type documented? I can't find it in r5rs or in the gambit documentation (though it is briefly mentioned in a tour of scheme through gambit). define-type is really cool and I'm starting to run against my limited knowledge of it.<br>

</blockquote></div>
Hi there!<br>
<br>
I've put some of Marc's undergrad notes related to define-type in the gambit-c wiki a while ago:<br>
<br>
<a href="http://dynamo.iro.umontreal.ca/~gambit/wiki/index.php/Define-type" target="_blank">http://dynamo.iro.umontreal.ca/~gambit/wiki/index.php/Define-type</a><br>
<br>
Hope it can help!<br><font color="#888888">
<br>
David<br>
</font></blockquote></div><br></div>