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

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -