SolarBear
07-01-2004, 12:08 PM
This may be more of a problem with clisp thant with the language itself, but here goes.
I have the following dumb script :
#!/usr/bin/clisp
(defun isinlist (lst elm)
(if (eql (car lst) elm)
t
(isinlist (cdr lst) elm)))
(isinlist '(1 2 3) 3)
which is obviously used to look if a element is part of a list or not. When I put these 2 instructions in the clisp interpreter, it works fine. However, if I use it as a script and try to execute it, I get no output. The function should return T since 3 is part of the list.
Is there anything I'm missing ?
I have the following dumb script :
#!/usr/bin/clisp
(defun isinlist (lst elm)
(if (eql (car lst) elm)
t
(isinlist (cdr lst) elm)))
(isinlist '(1 2 3) 3)
which is obviously used to look if a element is part of a list or not. When I put these 2 instructions in the clisp interpreter, it works fine. However, if I use it as a script and try to execute it, I get no output. The function should return T since 3 is part of the list.
Is there anything I'm missing ?