From e2feeee5b58d841085b708bfdb53178df8b884e7 Mon Sep 17 00:00:00 2001 From: Rich Hickey Date: Fri, 25 Jul 2008 20:22:28 +0000 Subject: added type hints to pr-strs and class? predicate --- src/clojure/boot.clj | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3-70-g09d2