I have since fixed the original stack overflow error I was getting, it was 
a result of not using "recur". However, I'm still trying to find the best 
way to actually iterate through the permutations to find the result...

On Friday, May 16, 2014 2:31:26 PM UTC-5, Brad Kurtz wrote:
>
> I'm pretty new to Clojure so I'm trying out simple examples to see if I 
> can get myself in the functional programming/Lisp mindset. My team lead 
> sends out puzzles from his Mensa calendar, and every once in a while I find 
> one that seems fun to solve as a Clojure program.
>
> With this particular puzzle, I've tried a couple of different ways of 
> "solving" the puzzle, and I decided to try a recursive function. I'm fairly 
> certain that what I've done here is not anywhere near ideal, and I'm 
> looking for insight into how to better write this solution.
>
> Also, with my latest attempt I seem to be getting a stack overflow error, 
> and I'm not quite sure why. I'm pretty sure it has to do with the 
> permutation sequence (it's basically 10 factorial, or around 3 million 
> sequences), but I don't really know how to better represent this problem in 
> Clojure. Can anyone help? Thanks!
>
> https://github.com/bradkurtz/clojure-puzzles/tree/master/billiards
>

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to