lisp - Invalid specialized parameter in method lambda list -
i trying write simple coin flip program in common lisp. code have
(defun yn (let ht (random 1) (if (eq ht 1) (princ heads) (princ tails)) ) )
it seems simple enough, keep getting error:
"invalid specialized parameter in method lambda list (let ht (random 1) (if (eq ht 1) (princ heads) (princ tails))): (if (eq ht 1) (princ heads) (princ tails))" )
what wrong here?
for defun
without parameters, there should empty parameter list, following:
(defun yn () (let ((ht (random 2))) (if (eq ht 1) (princ heads) (princ tails))))
Comments
Post a Comment