Search found 2 matches
- Wed Nov 04, 2009 6:02 pm
- Forum: Common Lisp
- Topic: setq doesn't work inside a function ?
- Replies: 4
- Views: 6140
Re: setq doesn't work inside a function ?
How do I make my function change the global variables then ?
- Wed Nov 04, 2009 10:39 am
- Forum: Common Lisp
- Topic: setq doesn't work inside a function ?
- Replies: 4
- Views: 6140
setq doesn't work inside a function ?
Hi guys. I need some help. I have a weird problem. If i do (defun fctn1 (list list2) (setq list2 (cons (car list) list2)) ) then I do (setq list (list 'a 'b)) (setq list2 (list)) (fctn1 list list2) I type list , i get (A B ) back I type list2, i get NIL back??? WHY NIL ?? I think decide to do it man...