cond
takes a list of tests and clauses
(cond (<test> <if test is true>)
(<test2> <if test2 is true>)
...)
I think what you meant to write is
(cond ((< 1 2) (print "hey"))) ;; if 1 is less than 2, print "hey"
What you've actually got in your question is
(cond (< 1 2) ;; if `<` is bound as a variable, return 2
(print "hey")) ;; if `print` is bound as a variable, return "hey"
Neither of those symbols are defined in the variable namespace by default, so you'll get an error.
If you only have one form to dispatch on, and only want to do something if it's true, it's more common to use when
than cond
.
(when (< 1 2) (print "hey"))