Re: why is it so annoying to run clojure code

2016-06-11 Thread Cornelius Goh
Just for curiosity. What mobile phone (Android or iOS) did you port your CommonLisp libraries onto ? -- 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 mo

Re: Puzzle solving in Clojure

2016-04-12 Thread Cornelius Goh
Thanks Gary for the explanation on "recur" in "TCE only" situation. -- 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 y

Re: Puzzle solving in Clojure

2016-04-12 Thread Cornelius Goh
True. Clojure doesn't provide tail call optimization. According to Daniel Higginbotham book "Clojure for the Brave and True" (Page 102) he suggests using "recur" for performance reasons. That is, in Olivier's original code, (sorry, without understanding his puzzle): (defn permutations [s]

Re: Puzzle solving in Clojure

2016-04-12 Thread Cornelius Goh
continued my above reply... read the "factorial" example in the Wikipedia on tail recursion to save space and time. Hope it helps! -- 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 tha

Re: Puzzle solving in Clojure

2016-04-12 Thread Cornelius Goh
https://en.m.wikipedia.org/wiki/Tail_call Tail call optimization... -- 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

Puzzle solving in Clojure

2016-04-09 Thread Cornelius Goh
Just my 2-cent suggestion : at your Permutation recursion function, may be try "recur" instead. -- 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 moder