summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2009-06-19 07:28:59 -0400
committerRich Hickey <richhickey@gmail.com>2009-06-19 07:28:59 -0400
commitf79e724224f86d938cd6ed287355808233c899e9 (patch)
tree551024744109676f04e825aaf8111e43e2bb832d
parent16420cd99a274d5f69930a46cde4899c091a5398 (diff)
removed nth overload
-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)