Skip to content

list is immutable? #2

@mw66

Description

@mw66

e.g.

$ ./chickenclisp 
=> (set x '(1 2 3))
[1, 2, 3]
=> (array-set-n x 0 4)
[4, 2, 3]
=> x
[1, 2, 3]

x is unchanged.

while in Lisp (SBCL), list is mutable:

* (defvar x '(1 2 3))
X
* x
(1 2 3)
* (setf (car x) 4)
4
* x
(4 2 3)

x is mutable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions