diff options
Diffstat (limited to 'src/clj')
-rw-r--r-- | src/clj/clojure/core.clj | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/clj/clojure/core.clj b/src/clj/clojure/core.clj index 6ff4a4c7..ab80af3d 100644 --- a/src/clj/clojure/core.clj +++ b/src/clj/clojure/core.clj @@ -849,6 +849,8 @@ (defn count "Returns the number of items in the collection. (count nil) returns 0. Also works on strings, arrays, and Java Collections and Maps" + {:tag Integer + :inline (fn [x] `(. clojure.lang.RT (count ~x)))} [coll] (. clojure.lang.RT (count coll))) ;;list stuff @@ -869,6 +871,8 @@ bounds, nth throws an exception unless not-found is supplied. nth also works for strings, Java arrays, regex Matchers and Lists, and, in O(n) time, for sequences." + {:inline (fn [c i] `(. clojure.lang.RT (nth ~c ~i))) + :inline-arities #{2}} ([coll index] (. clojure.lang.RT (nth coll index))) ([coll index not-found] (. clojure.lang.RT (nth coll index not-found)))) |