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

From: David Van Horn (dvanhorn at ccs.neu.edu)
Date: Sat May 2 19:25:03 EDT 2009

Eli Barzilay wrote:
> On May  2, David Van Horn wrote:
>> Eli Barzilay wrote:
>>> On May  2, David Van Horn wrote:
>>>> Matthias Felleisen wrote:
>>>>> Everyone, please find things you find useful in srfi/1 :-)
>>>> I'd like to see SRFI 1's make-list in scheme/list:
>>>>
>>>> (make-list n [fill]) -> list?
>>>>
>>>> I vote for it.  Sam votes for everything.  Matthias sent me code
>>>> that uses it, so he probably votes for it.  Is 2.5 votes enough?
>>> I'm voting against it: unlike `make-vector' and `make-string', a
>>> `make-list' would return an immutable value, so what would you use it
>>> for?
> 
> Can we please use text for answers?  I can grep just fine.

Sorry.

> 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)))

David



Posted on the dev mailing list.