something stupid I'm trying to do

2010-04-30 Thread john.holland
I'm pounding my head against the wall trying to understand how to do a simple task. What I want to do is write a function that will take a even-numbered set of numbers and split them into pairs. What I have right now is the following user> (defn pairup ([a b] [a b])([a b & rest] (cons (pairup

Re: something stupid I'm trying to do

2010-05-01 Thread john.holland
much thanks for the insight-giving answers from you all On Apr 30, 12:29 pm, "Mark J. Reed" wrote: > On Fri, Apr 30, 2010 at 12:25 PM, Mark J. Reed wrote: > > > I got an error when I tried ([a b]) instead of (list [a b]), by the way: > > > Clojure 1.1.0 > > user=> (cons [1 2] ([3 4])

Conjure / Compojure Docs etc

2010-06-28 Thread john.holland
I've seen a lot of mentions of Compojure on the group. I found the documentation a little lacking. Am I missing something obvious? Also, Conjure (sort of Rails done in Clojure) seems very nice, is well documented, etc. But I don't see any mention of it. Is there any reason for it not to be popular

stack overflow vs scheme

2011-12-01 Thread john.holland
I was studying clojure for a while, and took a break to work on SICP in scheme. I found that they do numerous things that are against advice in Clojure having to do with the tail recursion. I got to thinking about that Clojure recur/loop stuff and wondered how you would do a quicksort with it. S

Re: stack overflow vs scheme

2011-12-02 Thread john.holland
Thanks for all the replies. It seems to me that as general solutions to stack overflow, trampoline and recur are very valuable. I had gotten the mistaken idea that Scheme was somehow immune to the problem. My experiments in Scheme seemed to get to higher amounts of recursion before blowing up