scheme/list requests [was: Re: [plt-dev] Re: more requests for typed-scheme]

From: Sam TH (samth at ccs.neu.edu)
Date: Sat May 2 19:55:49 EDT 2009

On Sat, May 2, 2009 at 7:26 PM, Eli Barzilay <eli at barzilay.org> wrote:
> On May  2, David Van Horn wrote:
>> Eli Barzilay wrote:
>> > I don't see any `make-list' on these pages.
>>
>> No, but that's because there is no make-list, so it is written:
>>
>> (let ((v e))
>>    (build-list n (lambda (i) v)))
>
> Yes, I know.  Yet these are still a minority where `build-list' does
> fine -- specifically (a) none of these pieces of code had a separate
> abstraction for `make-list' (b) the confusion re its utility and
> immutability of lists is still there.

As to (a), that doesn't tell us anything about whether it would be
useful.  No one had written `for/list' before Matthew did, but it's
very useful.  As to (b), I don't think anyone will be confused about
whether the resulting list is mutable, since lists are all immutable.

When we have a function that we can easily add to a library, and that
would simplify multiple pieces of code we write, we should add it.  I
don't see why there's a debate about this.

-- 
sam th
samth at ccs.neu.edu


Posted on the dev mailing list.