User loginNavigation |
Unexpected lisp setf behaviourHi Folks, In writing some lisp code for uni coursework ("bin-packing" EA problem), I've encountered some weird behaviour. I copy a list, containing an element of type 'item', and attempt to set a value on the copy only. The code below is a modified excerpt but displays what I mean - I expected the 'container' in X to be 0, and its equivalent in M to be something random, but both elements get set to the same random value.
I'm fairly new to lisp, so I'm not sure if this is correct or not (I suspect that it is, since clisp and emacs lisp behave the same way). Can someone point me in the right direction? edit: Adding my solution for anyone googling for a similar problem: By smclemon at 2007-02-17 04:15 | LtU Forum | previous forum topic | next forum topic | other blogs | 5614 reads
|
Browse archives
Active forum topics |
Recent comments
22 weeks 6 days ago
22 weeks 6 days ago
22 weeks 6 days ago
45 weeks 19 hours ago
49 weeks 2 days ago
50 weeks 6 days ago
50 weeks 6 days ago
1 year 1 week ago
1 year 6 weeks ago
1 year 6 weeks ago