diff options
author | Rich Hickey <richhickey@gmail.com> | 2009-06-20 12:59:57 -0400 |
---|---|---|
committer | Rich Hickey <richhickey@gmail.com> | 2009-06-20 12:59:57 -0400 |
commit | 145fea489ea837e2dfa1af8fadb99da88c51c79f (patch) | |
tree | 17a11d33a347941d04d25c8b194ecf0c9e18deb7 | |
parent | 73059ebdbfebb361eff01079eccfd4591ab82055 (diff) | |
parent | f79e724224f86d938cd6ed287355808233c899e9 (diff) |
Merge branch 'master' into chunks
-rw-r--r-- | src/jvm/clojure/lang/RT.java | 10 |
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) |