A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.gnu.org/software/emacs/manual/html_node/elisp/Modifying-Lists.html below:

Modifying Lists (GNU Emacs Lisp Reference Manual)

Next: Using Lists as Sets, Previous: Modifying List Variables, Up: Lists   [Contents][Index]

5.6 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.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4