Page 1 of 1

help please

Posted: Mon Oct 05, 2009 6:29 am
by fred
probably an easy question for most but I'm just a beginner

I basically just want to change the lists in the below function
without using setf or setq
Eg make-array newarray1 newarray2 array3 array4 array5


I'm using an array of lists

Code: Select all

(defparameter *start-state*  (make-array '5 :initial-contents '((10 20 30 40 50)()()()())))

(defun measurement (state)
       (let*  ((array1 (aref state 0))
       (array2 (aref state 1))
       (array3 (aref state 2))
       (array4 (aref state 3))
       (array5 (aref state 4))

       (newarray1 (cdr array1))
       (newarray2 (cons (car  array1)  array2))))

Re: help please

Posted: Mon Oct 05, 2009 11:03 pm
by nuntius
I don't understand the question.

If I call (measurement *start-state*), what should the return value be and what should *start-state* equal?