(defun rand_sam (readin_lst) "Args: readin_lst Given a list of school ids, select the corresponding values from all the variables, returns a list of lists of values." (setf n (length readin_lst)) (setf rand nil) (dotimes (i 16) (setf x(repeat 0 (nth i len_lst1))) (setf rand(append rand(list (copy-list x)))) ) (dotimes (i 16) (dotimes (j (nth i len_lst1)) (setf (elt (elt rand i) j) (first (select bysc47n (which (= (elt sch i) (elt (elt readin_lst i) j) ) ) ) ) ) ) ) ) > len_lst1 (29 45 63 36 10 7 4 2 2 4 5 4 5 2 5 1 0) >135 209 292 165 45 31 20 9 10 18 22 17 24 8 22 6