Hi guys,

I'm writing a simple entity-component system for a game. An entity in this case 
is a vector of components and a component is just a map. Entities can be nested 
in a tree structure. I am using clojure.zip to traverse this tree and operate 
on the entities/components.

https://gist.github.com/sonelliot/e44662320b29d1c7b4b4#file-last-node-zipper-cljs

The 'lprocess' function processes an entity by mapping a function over all 
locations for which the predicate is true. Locations that don't match are 
unchanged.

Once the tree is processed I return the root of the last item. But this doesn't 
seem to work how I thought it would.

I've tried something like (zip/next) (zip/root) but this doesn't work either. 
What am I misunderstanding about this?

Any advice would be appreciated. Many thanks :) 

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to