ch2_1_setf
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
ch2_1_setf [2022/02/20 04:44] – created admin | ch2_1_setf [2025/01/23 05:45] (current) – admin | ||
---|---|---|---|
Line 1: | Line 1: | ||
**'' | **'' | ||
- | '' | + | '' |
'' | '' | ||
Line 10: | Line 10: | ||
</ | </ | ||
- | //Places// are returned from several // | + | //Places// are returned from several // |
<code lisp> | <code lisp> | ||
- | >(setq li '(a b c)) | + | >(setq li '(a b c)) |
(A B C) | (A B C) | ||
Line 20: | Line 20: | ||
>li | >li | ||
- | (D C B) | + | (D C B) ; value in the list was changed |
</ | </ | ||
+ | |||
+ | With '' | ||
+ | |||
+ | <code lisp> | ||
+ | >(setf (cdddr li) li) ; connecting the end of the list to the start | ||
+ | #1=(D B C . #1#) ; LabLISP will print it with anchor and link | ||
+ | </ | ||
+ | |||
+ | It is not recommended to use this dangerous feature. In the present state, LabLISP has just very rudimental protection against cyclic lists. Trying to work with cyclic lists might crash, produce memory leaks, or get stuck in infinite loops on C++ level. | ||
+ | |||
+ | |||
ch2_1_setf.1645357450.txt.gz · Last modified: 2022/02/20 04:44 by admin