diff options
author | Christophe Grand <christophe@cgrand.net> | 2009-08-10 17:43:27 +0200 |
---|---|---|
committer | Rich Hickey <richhickey@gmail.com> | 2009-08-26 12:02:56 -0400 |
commit | 96ff86023ba381c7126467dfa417a0a6e095a884 (patch) | |
tree | ff3740f4d48400c02cfe655a6e60097ac1d32b31 /src | |
parent | ad708fc31a924256bdbc9580c7929abc80487f70 (diff) |
implemented seq on array nodes
Signed-off-by: Rich Hickey <richhickey@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/jvm/clojure/lang/PersistentHashMap2.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/jvm/clojure/lang/PersistentHashMap2.java b/src/jvm/clojure/lang/PersistentHashMap2.java index c41c909c..627dc8cc 100644 --- a/src/jvm/clojure/lang/PersistentHashMap2.java +++ b/src/jvm/clojure/lang/PersistentHashMap2.java @@ -417,8 +417,11 @@ final static class ArrayNode implements INode{ if (s != null) return new Seq(meta, nodes, i, s); for(int j = i; j < nodes.length; j++) - if (nodes[j] != null) - return new Seq(meta, nodes, j + 1, nodes[j].nodeSeq()); + if (nodes[j] != null) { + ISeq ns = nodes[j].nodeSeq(); + if (ns != null) + return new Seq(meta, nodes, j + 1, ns); + } return null; } @@ -434,14 +437,11 @@ final static class ArrayNode implements INode{ } public Object first() { - // TODO Auto-generated method stub - return null; + return s.first(); } - @Override public ISeq next() { - // TODO Auto-generated method stub - return null; + return create(null, nodes, i, s.next()); } } |