diff options
-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) |