[plt-scheme] The historical role/value of set-car! and set-cdr!

From: Jos Koot (jos.koot at telefonica.net)
Date: Sat Jan 26 20:04:09 EST 2008

Please ignore my posting. To0 hasty reading.
Jos

----- Original Message ----- 
From: "Jos Koot" <jos.koot at telefonica.net>
To: "Chongkai Zhu" <czhu at cs.utah.edu>; "Grant Rettke" <grettke at acm.org>
Cc: "pltscheme" <plt-scheme at list.cs.brown.edu>
Sent: Sunday, January 27, 2008 1:51 AM
Subject: Re: [plt-scheme] The historical role/value of set-car! and set-cdr!


>
> ----- Original Message ----- 
> From: "Chongkai Zhu" <czhu at cs.utah.edu>
> To: "Grant Rettke" <grettke at acm.org>
> Cc: "pltscheme" <plt-scheme at list.cs.brown.edu>
> Sent: Sunday, January 27, 2008 1:38 AM
> Subject: Re: [plt-scheme] The historical role/value of set-car! and 
> set-cdr!
>
>
>> Say that you want a unfold-left that is tail recursive. The only way it 
>> to use set-cdr!
>>
>> Chongkai
>>
>
> (define (fold-right proc init . lists) (apply fold-left proc init (map 
> reverse lists)))
> I guess this is hardly slower than using set-cdr!.
> Jos Koot
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> 



Posted on the users mailing list.