if
Evaluates a statement
(if cond yesBlock noBlock?)Description
Body
Examples
(if (> 3 2) "yes" "no")
;;=> yes
(def var1 "aaa")
(if (= var1 "name") ;; condition
(print "Var & name equal") ;; yes
(print "not equal") ;; no
)
;;=> "not equal"
(if (and (> 2 3) (= 2 2))
(print "Yess")
)
Last updated