From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/elisp/modifying-lists.html | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 devdocs/elisp/modifying-lists.html (limited to 'devdocs/elisp/modifying-lists.html') diff --git a/devdocs/elisp/modifying-lists.html b/devdocs/elisp/modifying-lists.html new file mode 100644 index 00000000..b2eae408 --- /dev/null +++ b/devdocs/elisp/modifying-lists.html @@ -0,0 +1,22 @@ +

Modifying Existing List Structure

You can modify the CAR and CDR contents of a cons cell with the primitives setcar and setcdr. These are destructive operations because they change existing list structure. Destructive operations should be applied only to mutable lists, that is, lists constructed via cons, list or similar operations. Lists created by quoting are part of the program and should not be changed by destructive operations. See Mutability.

Common Lisp note: Common Lisp uses functions rplaca and rplacd to alter list structure; they change structure the same way as setcar and setcdr, but the Common Lisp functions return the cons cell while setcar and setcdr return the new CAR or CDR.

+
+ + + + + + + + + + + +
+

+ Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc.
Licensed under the GNU GPL license.
+ https://www.gnu.org/software/emacs/manual/html_node/elisp/Modifying-Lists.html +

+
-- cgit v1.2.3