You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
clojure-koans/koans/path_to_enlightenment.clj

15 lines
383 B
Clojure

(load "about-asserts")
(defn meditate-on
"Runs tests but exits if an assertion fails"
[test]
(try
(test)
(catch Throwable t
(println (str "Metadata zen\n" "test name failed"))
(System/exit 1))))
(meditate-on test-truth)
(meditate-on test-assert-equality)
(println "You have achieved clojure zen. Go out into the universe and spread your newfound knowledge.")