summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2009-06-20 12:59:57 -0400
committerRich Hickey <richhickey@gmail.com>2009-06-20 12:59:57 -0400
commit145fea489ea837e2dfa1af8fadb99da88c51c79f (patch)
tree17a11d33a347941d04d25c8b194ecf0c9e18deb7
parent73059ebdbfebb361eff01079eccfd4591ab82055 (diff)
parentf79e724224f86d938cd6ed287355808233c899e9 (diff)
Merge branch 'master' into chunks
-rw-r--r--src/jvm/clojure/lang/RT.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/jvm/clojure/lang/RT.java b/src/jvm/clojure/lang/RT.java
index 0a33f55a..728a2a76 100644
--- a/src/jvm/clojure/lang/RT.java
+++ b/src/jvm/clojure/lang/RT.java
@@ -717,13 +717,13 @@ static public Object dissoc(Object coll, Object key) throws Exception{
return ((IPersistentMap) coll).without(key);
}
-static public Object nth(Indexed coll, int n){
- if(coll != null)
- return coll.nth(n);
- return null;
+static public Object nth(Object coll, int n){
+ if(coll instanceof Indexed)
+ return ((Indexed) coll).nth(n);
+ return do_nth(coll,n);
}
-static public Object nth(Object coll, int n){
+static public Object do_nth(Object coll, int n){
if(coll instanceof Indexed)
return ((Indexed) coll).nth(n);
if(coll == null)