run multiple function

Discussion of Common Lisp

run multiple function

Postby doot » Sat Dec 17, 2011 9:49 am

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?
Posts: 2
Joined: Sat Dec 17, 2011 5:16 am

Re: run multiple function

Postby krzysz00 » Sat Dec 17, 2011 11:59 am

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
Code: Select all
(function (arg1 arg2 ... argN))
to call functions, you use
Code: Select all
(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:

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

Code: Select all
(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.
Posts: 4
Joined: Mon Nov 07, 2011 5:10 pm

Return to Common Lisp

Who is online

Users browsing this forum: No registered users and 4 guests