Re: Processing an array

2016-04-26 Thread Olivier Scalbert
Thanks to all of you for your interesting answers ! Olivier -- 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

Processing an array

2016-04-24 Thread Olivier Scalbert
Hi all, I am a Clojure beginner And I have an advice to ask ! I have an array of events: (def events [ {:id "1" :duration 100} {:id "2" :duration 200} {:id "3" :duration 300} ]) I wanted to transform this array into: [ {:id 1, :duration 100, :time 0} ; event 1 starts at 0 {:id

Re: Puzzle solving in Clojure

2016-04-14 Thread Olivier Scalbert
Whooww that is impressive ! Respect !!! Olivier -- 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.

Re: Puzzle solving in Clojure

2016-04-13 Thread Olivier Scalbert
Thanks to all of you ! There are so much material in your answers that I need to wait this week-end to do some tests ! Clojure is cool ! -- 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

Re: Puzzle solving in Clojure

2016-04-11 Thread Olivier Scalbert
Thanks for your help. I have replaced "my" permutations by "your" permutations code. It works faster (16s against 20 or 24s). And it seems to consume much less memory. Now, I will try to understand how it works, which is another story (for me of course!). -- You received this message

Puzzle solving in Clojure

2016-04-08 Thread Olivier Scalbert
Hello everybody ! I just start learning Clojure and I am a complete newbie ! I have tried to solve this classical small puzzle with Clojure. Assign one digit from {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} to each letter {o n e t h r l v w y} so that one + one + one + three + three + eleven = twenty Here