home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!snorkelwacker.mit.edu!ai-lab!zurich.ai.mit.edu!jinx
- From: jinx@zurich.ai.mit.edu (Guillermo J. Rozas)
- Newsgroups: comp.lang.scheme
- Subject: Re: Initializing vector elements
- Message-ID: <JINX.92Aug19091513@chamarti.ai.mit.edu>
- Date: 19 Aug 92 13:15:13 GMT
- References: <PK.92Aug19100516@talitiainen.cs.tut.fi>
- <MFX.92Aug19102656@lenin.cs.tu-berlin.de>
- Sender: news@ai.mit.edu
- Reply-To: jinx@zurich.ai.mit.edu
- Distribution: comp
- Organization: M.I.T. Artificial Intelligence Lab.
- Lines: 15
- In-reply-to: mfx@cs.tu-berlin.de's message of 19 Aug 92 08:27:30 GMT
-
- In article <MFX.92Aug19102656@lenin.cs.tu-berlin.de> mfx@cs.tu-berlin.de (lala) writes:
-
- | You are nearly right -- IMHO, the Right Way is to give the init
- | procedure the index of the element to create:
- |
- | (define m (make-vector 10 (lambda (i) (make-vector 10 0))))
- |
- | like, in,
- |
- | (make-vector 10 identity) => #(0,1,2,3,4,5,6,7,8,9)
- |
-
- This procedure exists in certain dialects. In MIT Scheme it is called
- MAKE-INITIALIZED-VECTOR.
-
-