Re: Filter Causing StackOverflowError?

2009-09-03 Thread Krukow
On Sep 2, 7:02 pm, tmountain tinymount...@gmail.com wrote: (defn generate-chain [source]   (loop [the-list (map #(list (first (split-at 2 %)) (last %))                       (partition 3 1 (.split (.replace source \n ) )))          res (hash-map)]     (if (empty? the-list)       res  

Re: Filter Causing StackOverflowError?

2009-09-03 Thread tmountain
I had a suspicion that something similar to this might be happening. As I said in the first message, including a doall on the filters prevented the issue from happening. I will relay this info back to my friend. Thanks for the help. On Sep 3, 12:04 am, John Harrop jharrop...@gmail.com wrote: On

Re: Filter Causing StackOverflowError?

2009-09-03 Thread tmountain
The function returns a map with the keys being word pairs and the value being a single word. It is a component of a larger program. user= (generate-chain a quick brown fox jumps over the lazy dog) {(the lazy) (dog), (over the) (lazy), (jumps over) (the), (fox jumps) (over), (brown fox) (jumps),

Re: Filter Causing StackOverflowError?

2009-09-02 Thread John Harrop
On Wed, Sep 2, 2009 at 1:02 PM, tmountain tinymount...@gmail.com wrote: Hi all - I've recently encouraged a friend to start learning Clojure, and he has written some basic Markov chaining code as a learning exercise. His code works fine with small sets of input data, but larger inputs have