3 ms·
Cons cells are mutable. Saying that cons is functional as long as you don't modify the result later is like saying that variable assignment in C is functional.
by noosphr 1y ago
Cons cells are mutable.
Saying that cons is functional as long as you don't modify the result later is like saying that variable assignment in C is functional.
There are lisp dialects that have immutable cons: https://docs.racket-lang.org/reference/pairs.html https://docs.racket-lang.org/reference/pairs.html