Page 1 of 1
run multiple function
Posted: Sat Dec 17, 2011 9:49 am
by doot
i have 4-5 function and i want to make a run function to run all 4-5 function
(defun run(l)
(multime (l))
(inversa (l))
(duplicate (l))
(inversa (l))
)
the above cod is rong how an i do?
Re: run multiple function
Posted: Sat Dec 17, 2011 11:59 am
by krzysz00
First off, please put your code between code tags (hit the "code" button and paste your code between the tags). Second, in Lisp, you don't use
to call functions, you use
Also, you need a space between the name of the function and its argument list, because they are different arguments to defun. So, to make your code function correctly, write it like so:
Code: Select all
(defun run (l)
(multime l)
(inversa l)
(duplicate l)
(inversa l))
I'm also not sure what there functions do. A lot of the time, Common Lisp functions don't modify their arguments. For example
Will return 6 and leave x set to 2. If the reformatted code I gave you still does not give you the correct results, please let me know (and tell me what the functions you are calling actually do) and I will help you further.