I am trying to write a simple coin flip program in Common Lisp. This is the code I have
(defun yn
(let ht (random 1)
(if (eq ht 1)
(princ heads)
(princ tails))
)
)
It seems simple enough, but I keep getting the 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 could be wrong here?
For
defun
without parameters, there should be an empty parameter list, like the following: