This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

help please

2 posts · 1251 views

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
(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

I don't understand the question.

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