Search found 11 matches

by beren
Thu Mar 05, 2009 4:12 pm
Forum: Common Lisp
Topic: pushing links, not elements
Replies: 15
Views: 28010

pushing links, not elements

Hi there, I am just starting with lisp and I can't figure out the following issue: I want to push *not* elementos into a list, but its *references*, for example, if I write (let ( (a '()) (b '())) (push 1 a) (push a b) (push 2 a) (print a) (print b)) I get (2 1) ((1)) and I would like (2 1) ((2 1)) ...