I also want to throw this code out there. https://gist.github.com/1263782
The current walk takes multiple types (I assume the expected behaviour would be to return the last node for each type), but instead it blows up. Assuming your reduce works like it should, this code makes that function work that way. Example (with-db! "playground" (doall (my-walk (root) :humans :programs))) => (#<NodeProxy Node[1]> #<NodeProxy Node[2]>) On Oct 4, 8:46 pm, Daniel <doubleagen...@gmail.com> wrote: > :sigh: Google removed by [Borneo] tag from the subject heading.... > > On Oct 4, 8:39 pm, Daniel <doubleagen...@gmail.com> wrote: > > > > > > > > > To add to this, (all-nodes) silently populates an empty list (probably > > not what the user wants). > > > user=> (neo/with-db! "playground" (neo/all-nodes)) > > () > > user=> (neo/with-db! "playground" (doall (neo/all-nodes))) > > (#<NodeProxy Node[0]> #<NodeProxy Node[1]> #<NodeProxy Node[2]> > > #<NodeProxy Node[3]> #<NodeProxy Node[4]> #<NodeProxy Node[5]> > > #<NodeProxy Node[6]> #<NodeProxy Node[7]> #<NodeProxy Node[8]>) > > > The major problem, of course, is that we can only be lazy inside the > > with-db! macro.... > > > On Oct 4, 8:34 pm, Daniel <doubleagen...@gmail.com> wrote: > > > > Borneo get's bit by this bug: > > > >http://lists.neo4j.org/pipermail/user/2011-February/006460.html > > > > Here's a simple example: > > > > (neo/with-db! "playground" > > > (let [humans (neo/walk (neo/root) :humans) > > > human-nodes (neo/traverse humans :human)] > > > (map neo/props human-nodes))) > > > NullPointerException > > > org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.nodeLoadLight > > > (ReadTransaction.java:81) > > > ( > > > > Given the bug's nature, we can easily fix the Exception by wrapping > > > the last function call in a doall... > > > > (neo/with-db! "playground" > > > (let [humans (neo/walk (neo/root) :humans) > > > human-nodes (neo/traverse humans :human)] > > > (doall (map neo/props human-nodes)))) > > > ({:name "Cypher"} {:name "Morpheus", :rank "Captain", :age 35} {:name > > > "Trinity", :age 27} {:name "Thomas Anderson", :age 29}) > > > > This could be easily fixed in borneo.core by wrapping the last > > > function call, or just documenting it & leaving it to the programmer. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en