bldc/tests/test_match_guard_1.lisp

12 lines
175 B
Common Lisp

(defun f (x)
(match nil
( _ (<= x 10) (+ x 1))
( _ (> x 10) (+ x 100))))
(check (and (= (f 0) 1)
(= (f 2) 3)
(= (f 11) 111)))