This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

run multiple function

2 posts · 1275 views

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

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
(function (arg1 arg2 ... argN))
to call functions, you use
(function arg1 arg2 ... argN)
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:
(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
(setf x 2) 
(* 3 x)
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.