Hi Kwccoin,
Welcome. There’s a few folks that were previously xlisp-stat users on this list. Two resources you might find helpful:
The latter contains code you’ll probably find familiar. Much could be ported to CLS without too much trouble.
; --- using p.145 of lisp-stat the book ("LISP-STAT: AN OBJECT-ORIENTED ENVIRONMENT FOR STATISTICAL COMPUTING AND DYNAMIC GRAPHICS")
```
(setf x (make-array '(3 2)
:initial-contents '((1 2 ) (3 4) (5 6))))
(select x '(0 1) 1). ; (surprise books say #2a((2) (4)) but lisp-stat just return #(2 4) not #2a((2) (4))
(setf (select x '(0 1) 1) '#(x y)) ;hence the code has to be modified here, not '2a((x) (y))
x
; strangely the book code is NOT working using the lisp-stat software here and has to be amended as above(def y #(3 7 5 9 12 3 14 2))
(setf (aref y 1) 11)
(setf (select y 1) 12)
(setf (select y (list 0 2)) '#(18 19))
(def x (list 3 7 5 9 12 3 14 2))
x
(select x 1) ; ok
(setf (select x 1) 11 ) ; this does not work (11 (3 7 5 9 12 3 14 2) 1).
(setf (select x (list 0 2)) (list 15 16))
(defun delete-case1 (x i)
(select x (remove i (iota (length x)))))
Seems to lost the last element