Re: Saving the Clojure.org webiste

2009-05-19 Thread Trevor Caira
I haven't personally tried it on clojure.org, but wget -m tends to work well for this kind of task. Trevor Kei Suzuki wrote: > I wanted to save the Clojure.org website so that I can read it when > I'm off-line. The problem is that none of the website downloader tools > I found is satisfactory; t

Re: Override the + operator for a 'struct'

2009-05-16 Thread Trevor Caira
One way to accomplish this is via :refer-clojure in ns. Usage is like: (ns test (:refer-clojure :exclude [+])) This would allow you to, for example, dispatch the implementation based on the type of the first argument via multimethods (as Michel S. noted, at a performance penalty). The origina

Re: list vs vector

2009-05-16 Thread Trevor Caira
Remember clojure, like other lisps, is homoiconic: the program code itself is clojure data. Lists are very common in clojure, since a list is is used in the function invocation syntax, e.g. (inc 0). Otherwise, used as a general purpose lists have the same benefits of linked lists over arrays that