[Prev][Next][Index][Thread]

Re: [FD] utility of vector?



On Tue, 7 Mar 2000 12:15:01 -0500 (EST), Hugh Greene <q@tardis.ed.ac.uk> wrote:

> On Tue, 7 Mar 2000, Jason Trenouth wrote:
> > On Tue, 7 Mar 2000 11:15:01 -0500 (EST), dauclair@hotmail.com wrote:
> > 
> > > So, the DRM says one can get a new vector with vector().  I tried it
> > > ... obviously the size: and fill: keywords don't work.  So, if I
> > > 
> > > let row = make(<vector>,size: 120, fill: 0);
> > > 
> > > how do I do the same with the vector fn?
> > 
> > vector(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
> > 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
> > 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
> > 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
> > 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
> 
> Nonono, you write a new (non-mutable?) lazy <sequence> subclass which
> contains N copies of some value V (or N concatenations of a sequence S?)
> you supply in the call to make, then do something like
> 
>   apply(vector, make(<repeater-sequence>, size: 120, fill: 0), #[]);

Eh? It would be much easier just to do:

	apply(vector, make(<list>, size: 120, fill: 0));

:-j

__Jason


References: