Here is the code for Lisp
(defun mymax (nums)
(cond ((= (length nums) 1) (car nums))
((> (car nums) (cadr nums))
(mymax (cons (car nums)
(cddr nums))))
(t (mymax (cdr nums)))))
I'd like to know how can it be done with Newlisp, specially the cadr, cddr and cdr functions.
Thanks in advance
Sorry for putting this in the news forum :(