12 Apr
2005
12 Apr
'05
4:51 p.m.
On Tue, 12 Apr 2005 15:27:53 +0100, "Richard Lewis" <richardlewis@fastmail.co.uk> said:
I've been writing a 'hello world' program which consists of a function that returns T if the given parameter is prime or else it returns NIL; the only thing is, it doesn't work.
Scrub that, I've just fixed it: ==================================== (defun prime-rfunc (x iterator) (if (= x iterator) (not ()) (if (= 0 (mod x iterator)) () (prime-rfunc x (1+ iterator))))) (defun prime (x) (prime-rfunc x 2)) (print (prime 1471)) ==================================== R.