Search found 2 matches

by nomiz
Wed Oct 06, 2010 1:22 am
Forum: Common Lisp
Topic: Assign values to multiple variables
Replies: 4
Views: 5208

Re: Assign values to multiple variables

Wow, guys thanks a lot for all the input and info! :D

You have helped me a lot understanding lisp programming.
by nomiz
Fri Oct 01, 2010 7:56 am
Forum: Common Lisp
Topic: Assign values to multiple variables
Replies: 4
Views: 5208

Assign values to multiple variables

Hi all,

To assign random values to multiple variables i tried:

Code: Select all

(defun foo (var1 var2 var3 var4)
  (mapcar #'(lambda (x)
	      (setq x (random 10))
	      (list var1 var2 var3 var4))
	  )
  )
What is the right way?

Thanks! :)