technoblogy / ulisp-arm

A version of the Lisp programming language for ARM-based boards.
http://www.ulisp.com/
MIT License
107 stars 30 forks source link

cond gives error if test clause omitted #20

Closed technoblogy closed 4 years ago

technoblogy commented 4 years ago

Example:

(defun test (n)
  (cond
   ((oddp n) n)
   ((list n))))

(test 2) gives an error. Workaround: include a t for the final clause:

(defun test (n)
  (cond
   ((oddp n) n)
   (t (list n))))