Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!ub!dsinc!netnews.upenn.edu!linc.cis.upenn.edu!vinson From: vinson@linc.cis.upenn.edu (Jack Vinson) Newsgroups: comp.lang.lisp Subject: another question, arrays Message-ID: <43929@netnews.upenn.edu> Date: 30 May 91 14:38:31 GMT Sender: news@netnews.upenn.edu Reply-To: vinson@linc.cis.upenn.edu (Jack Vinson) Distribution: na Organization: University of Pennsylvania Lines: 18 Nntp-Posting-Host: linc.cis.upenn.edu Me again, I am also playing with arrays for the first time in lisp and am wondering what kind of interesting functions there are for messing with them. In particular I will be frequently updating one array by moving elements down into the array. ie if the array is (1.2 1.1 1.2 1.3 1.1 1.0) and new data is 1.2 I want to put the new info at the 'beginning' of the array and shift everything down, so I would get (1.2 1.2 1.1 1.2 1.3 1.1) with the last element knocked off. The way I know how to do this is with a do-loop that copies element i into i+1, starting from the highest element. One solution is to just use a gigantic array which I just add new data to the end of, but this seems like it might waste space ~time~. Which is more expensive, keeping track of five 20x2 arrays the above way or creating five 5000x2 arrays and adding data from the beginning? Jack Jack Vinson vinson@linc.cis.upenn.edu