On 4 Mai, 17:01, Emeka <emekami...@gmail.com> wrote: > Hello All, > I want to arrange objects in rows and also being able to manipulate them. By > manipulation I meant, I could move one object from one row and use it to > replace another object in another. Should I use Map or something else? I > need your opinions here
>From what you say I imagine you have something like a matrix or table, something with rows and columns that form cells. And you want to be able to grab the contents of one cell and move it around to another cell. I don't know how much that fits your plan. But if it is similar then one idea could be to have your objects being keys of a hashmap and let the values be vectors of two numbers: for the row and column. If you want to change the position of an object then you should dissoc it from its current [r c] (the key) and assoc it to its new [r c] key. --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---