diff options
author | Rich Hickey <richhickey@gmail.com> | 2008-07-25 20:22:28 +0000 |
---|---|---|
committer | Rich Hickey <richhickey@gmail.com> | 2008-07-25 20:22:28 +0000 |
commit | e2feeee5b58d841085b708bfdb53178df8b884e7 (patch) | |
tree | 38a79e1b4f92ceccddbe50fef6644407631da06f /src | |
parent | 8e7a9804b0aa8a6a75185aad42c1fec6990a6d17 (diff) |
added type hints to pr-strs and class? predicate
Diffstat (limited to 'src')
-rw-r--r-- | src/clojure/boot.clj | 10 |
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 |