Re: Why I'm getting StackoverflowError?

2010-12-05 Thread Danny Woods
On Dec 5, 9:52 pm, HB hubaghd...@gmail.com wrote: Hi, I'm trying to write a function that calculates the length of a list: (defn list-length [col]   (if col     (+ 1 (list-length(rest col)))     0)) (list-length '(Java, Clojure, Scala)) Upon running it in the REPL, I got the error:

Re: One benefit of having a REPL

2009-11-29 Thread Danny Woods
On Nov 28, 1:20 pm, John Harrop jharrop...@gmail.com wrote: One benefit of having a REPL: it makes regular expressions usable. So easy to test and tweak your RE compared to the traditional compile/test/debug cycle! I never even bothered with the java.util.regex package before Clojure as it was

Re: Deep deref

2009-11-15 Thread Danny Woods
Danny, could you maybe hack up a possible very simple example of what you mean? snip I can not simply store a copy of the Karl person in Tinas :friends slot, because when Karl gets one year older, then I don‘t want to go through all persons, looking for Karls, and have their age updated.

Re: Deep deref

2009-11-14 Thread Danny Woods
André Thieme wrote: How can we handle this situation? Is it possible to implement a function “deep-deref” which works as blindingly fast as deref does? I find this very important, and this is of great practical relevance for me. Please share your ideas Hi André, I had a similar issue with

Re: Beginner: performance of vector creation/modification

2009-10-19 Thread Danny Woods
harto wrote: Hello, I've just started learning Clojure, so I'm trying to figure out the correct way of doing things. I've been trying to create and 'modify' a large vector for an online programming exercise, but I'm running into some performance issues. Any general tips would be

Re: Beginner: performance of vector creation/modification

2009-10-19 Thread Danny Woods
of the vector on every iteration: I suspect that may involve a traversal of the vector every time it's called. Cheers, Danny. On 19/10/2009 13:37, Stuart Campbell wrote: 2009/10/19 Danny Woods dannywo...@gmail.com mailto:dannywo...@gmail.com harto wrote: Hello, I've just started

Re: Proposal: New Reader Macro #s{ ... }

2009-10-12 Thread Danny Woods
Perl and Ruby do something similar with regular expressions, where the character following 'm' or 's' becomes the delimiter for that expression, making 'm/\/some\/path/' identical to 'm!/some/path!'. The delimeter can be 'smart' as well, where the closing delimiter is dependent upon the opening

Re: What books have helped you wrap your brain around FP and Clojure?

2009-06-07 Thread Danny Woods
+1 for Higher Order Perl. The author, Mark Jason Dominus, has made the book available for free download at http://hop.perl.plover.com/book/. Cheers, Danny. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure