[plt-scheme] polymorphism of primitive types

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Tue Oct 18 11:47:21 EDT 2005

On Oct 18, 2005, at 11:17 AM, Yoav Goldberg wrote:

> First of all, I would like to thank you all for the patiance. I do
> seem to have many questions.. ;-)
>
>> I believe that you don't want infinite lists but rationale ones, i.e.,
>> lists with repeated patterns. These are graphs and you should probably
>> just turn them into graphs:
>>
>> (define qqh (shared ([qqh (cons quarter (cons quarter (cons half
>> qqh)))]) qqh))
>> (map (lambda (pitch duration) ...) do-re-mi qqh)
>>
>> Have you considered that?
> After some playing with it, I found out that:
> 1/ this is neat.
> 2/ this doesn't solve my problem - the builtin map doesn't work on 
> graphs.

Ah, that's a bug!!!! Thanks.

> 3/ I prefer streams in this case as they give me much more flexibility
> - I can control their sizes, append them, merge them, etc.

All of this applies to rational graphs, too. Well, if you define the 
functions ...

-- Matthias



Posted on the users mailing list.