(def x (list 3 7 5 9 12 3 14 2)) ; same as (defparameter x (list 3 7 5 9 12 3 14 2)) I assume
(select x 1) ; do return 7
There is no applicable method for the generic function
#<STANDARD-GENERIC-FUNCTION (COMMON-LISP:SETF SELECT:SELECT) (2)>
when called with arguments
(11 (3 7 5 9 12 3 14 2) 1).
[Condition of type SB-PCL::NO-APPLICABLE-METHOD-ERROR]
; Evaluation aborted on NIL
LS-USER> ; Quit to level 1
LS-USER> ; Evaluation aborted on #<SB-PCL::NO-APPLICABLE-METHOD-ERROR {10046A6203}>
(def y #(3 7 5 9 12 3 14 2))
(setf (aref y 1) 11)
y ; #(3 11 5 9 12 3 14 2)
or
(setf (nth 2 x) 11)
---
Select returns a vector, array or data-frame. It is not a setf-able place. See generalized variables and setf. This is a not-uncommon Lisp error when beginning.
One thing to keep in mind is that Lisp-Stat is not the same as XLISP-Stat. You won’t be able to work through that book using Lisp-Stat. Common Lisp and XLisp differ. The best tutorials are on the website https://lisp-stat.dev/. If you encounter any problems working through those tutorials, we’d like to hear about them because they all work (we think). You could work possibly work through the XLISP-Stat book using the XLS-Compat system; no one has done that though.
In 2022, I think your best option is to learn Common Lisp. It’s close enough to XLISP that much will be familiar, and there are many tutorials and learn resources available. For example see:
--
You received this message because you are subscribed to the Google Groups "Common Lisp Statistics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
lisp-stat+...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lisp-stat/c8888e17-def4-4522-9725-780cfc0b7033n%40googlegroups.com.