Mutation

Mike McDonald mikemac@titian.engr.sgi.com
Wed, 14 May 1997 11:43:39 -0700


>Date: Wed, 14 May 1997 12:06:27 +0300
>From: "Harvey J. Stein" <abel@netvision.net.il>
>To: Mike McDonald <mikemac>
>Subject: Re: Mutation 
>
>Mike McDonald writes:
> > 
> > From: BRIAN SPILSBURY <zhivago@iglou.com>
> > 
> > >(make-array (length foo) :allocation immutable :generator
> > >  `(lambda (i) (nth i ,foo)))
> > >
> > >to initialize from a list.
> >
> >   Why not just use the :initial-contents keyword?
>
>Because one would have to generate a list for the contents, just so it
>gets thrown away after creating the array, thus being an additional
>source of garbage.  Henry Baker already mentioned this approach:

  Dah, in Brian's example, he already HAS a list!


  Mike McDonald
  mikemac@engr.sgi.com