On 13/06/12 17:22, nicolas.o...@gmail.com wrote:
For example, if your state were a vector [:x :o :x nil .... :x]
(for a board of tic-tac-toe), calling (assoc board 3 :x) will return a
new board
with the position 3 set to :x.

Yes but in tic-tac-toe you are inserting pieces while in chess/checkers you move pieces...that is, pieces disappear from their original position and move to the next. Using your recommendation I would have to do at least 1 dissoc and 1 assoc for a single move won't I? on the other hand, with your approach it means I don't have to build a new board after each move - it happens automatically...

by the way, and I'm not trying to argue here...trying to make constructive conversation! I don't have a lot of people I can talk with about these things...thanks :-)

Jim

--
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

Reply via email to