summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2008-07-25 20:22:28 +0000
committerRich Hickey <richhickey@gmail.com>2008-07-25 20:22:28 +0000
commite2feeee5b58d841085b708bfdb53178df8b884e7 (patch)
tree38a79e1b4f92ceccddbe50fef6644407631da06f
parent8e7a9804b0aa8a6a75185aad42c1fec6990a6d17 (diff)
added type hints to pr-strs and class? predicate
-rw-r--r--src/clojure/boot.clj10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/clojure/boot.clj b/src/clojure/boot.clj
index 1c53114e..04e7e61a 100644
--- a/src/clojure/boot.clj
+++ b/src/clojure/boot.clj
@@ -2243,24 +2243,28 @@ not-every? (comp not every?))
(defn pr-str
"pr to a string, returning it"
+ {:tag String}
[& xs]
(with-out-str
(apply pr xs)))
(defn prn-str
"prn to a string, returning it"
+ {:tag String}
[& xs]
(with-out-str
(apply prn xs)))
(defn print-str
"print to a string, returning it"
+ {:tag String}
[& xs]
(with-out-str
(apply print xs)))
(defn println-str
"println to a string, returning it"
+ {:tag String}
[& xs]
(with-out-str
(apply println xs)))
@@ -2712,4 +2716,8 @@ not-every? (comp not every?))
(send-off agt fill)
(lazy-cons (if (identical? x NIL) nil x) (drain))))))]
(send-off agt fill)
- (drain)))) \ No newline at end of file
+ (drain))))
+
+(defn class?
+ "Returns true if x is an instance of Class"
+ [x] (instance? Class x)) \ No newline at end of file