20
This commit is contained in:
parent
91bccfa55f
commit
ee1381cfa9
1 changed files with 5 additions and 5 deletions
|
|
@ -3,17 +3,17 @@
|
||||||
|
|
||||||
(meditations
|
(meditations
|
||||||
"You may have done more with Java than you know"
|
"You may have done more with Java than you know"
|
||||||
(= __ (class "warfare")) ; hint: try typing (javadoc "warfare") in the REPL
|
(= java.lang.String (class "warfare")) ; hint: try typing (javadoc "warfare") in the REPL
|
||||||
|
|
||||||
"The dot signifies easy and direct Java interoperation"
|
"The dot signifies easy and direct Java interoperation"
|
||||||
(= __ (.toUpperCase "select * from"))
|
(= "SELECT * FROM" (.toUpperCase "select * from"))
|
||||||
|
|
||||||
"But instance method calls are very different from normal functions"
|
"But instance method calls are very different from normal functions"
|
||||||
(= ["SELECT" "FROM" "WHERE"] (map ___ ["select" "from" "where"]))
|
(= ["SELECT" "FROM" "WHERE"] (map #(.toUpperCase %) ["select" "from" "where"]))
|
||||||
|
|
||||||
"Constructing might be harder than breaking"
|
"Constructing might be harder than breaking"
|
||||||
(= 10 (let [latch (java.util.concurrent.CountDownLatch. __)]
|
(= 10 (let [latch (java.util.concurrent.CountDownLatch. 10)]
|
||||||
(.getCount latch)))
|
(.getCount latch)))
|
||||||
|
|
||||||
"Static methods are slashing prices!"
|
"Static methods are slashing prices!"
|
||||||
(== __ (Math/pow 2 10)))
|
(== 1024 (Math/pow 2 10)))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue