clojure-koans/src/koans/19_java_interop.clj
David Kinzer 711925a043 Add name-spaces to the clojure koans files.
This commit adds two name-spaces to beginning of the clojure koan files
in order to fix an issue both #68 and #69.
2014-05-02 16:38:17 -05:00

20 lines
666 B
Clojure

(ns koan-engine.runner)
(ns koans.19-java-interop (:use koan-engine.core))
(meditations
"You may have done more with Java than you know"
(= __ (class "warfare")) ; hint: try typing (javadoc "warfare") in the REPL
"The dot signifies easy and direct Java interoperation"
(= __ (.toUpperCase "select * from"))
"But instance method calls are very different from normal functions"
(= ["SELECT" "FROM" "WHERE"] (map ___ ["select" "from" "where"]))
"Constructing might be harder than breaking"
(= 10 (let [latch (java.util.concurrent.CountDownLatch. __)]
(.getCount latch)))
"Static methods are slashing prices!"
(== __ (Math/pow 2 10)))