ch2_1_setf
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ch2_1_setf [2022/02/20 04:58] – admin | ch2_1_setf [2025/01/23 05:45] (current) – admin | ||
---|---|---|---|
Line 23: | Line 23: | ||
</ | </ | ||
- | With SETF, it is possible to create cyclic lists: | + | With '' |
<code lisp> | <code lisp> | ||
>(setf (cdddr li) li) ; connecting the end of the list to the start | >(setf (cdddr li) li) ; connecting the end of the list to the start | ||
- | (D B C .cyc) ; LabLISP | + | #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, and might get stuck in infinite loops (on C++ level), crashes and memory leaks. | + | 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.1645358303.txt.gz · Last modified: 2022/02/20 04:58 by admin