Re: Newbie question

2016-09-04 Thread Charlie
Thanx Colin & James - got it now - Charlie On Sunday, September 4, 2016 at 5:31:40 PM UTC-4, Colin Yates wrote: > > This form allows the fn to have multiple arities. So if I call > (recursive-printer) it will 'invoke' ([] (recursive-printer 0)). If I call > (recursive-printer 1) then it will

Re: Frustrations so far

2016-09-04 Thread Didier
*1) Slow startup speed.* Everyone dislikes the slow startup speed. Though it's been argued that it should be known as the Clojure slow startup speed. Since even though the JVM is slower to start then say python, most of the slowness comes from the Clojure overhead. *I know this problem is

Re: Newbie question

2016-09-04 Thread Colin Yates
This form allows the fn to have multiple arities. So if I call (recursive- printer) it will 'invoke' ([] (recursive-printer 0)). If I call (recursive- printer 1) then it will 'invoke' ([iteration] ...). HTH -- Colin Yates colin.ya...@gmail.com On Sun, 4 Sep 2016, at 09:54 PM, Charlie

Re: Newbie question

2016-09-04 Thread James Reeves
Functions in Clojure can behave differently depending on the number of arguments they receive (their "arity"). A function can be written: (defn foo [x] (str "foo" x)) But you can also write: (defn foo ([] "empty foo") ([x] (str "foo" x)) This will do different things

Newbie question

2016-09-04 Thread Charlie
I'm going through the Do Things: A Clojure Crash Course, and the following example (in REPL) is presented: (defn recursive-printer ([] (recursive-printer 0)) ([iteration] (println iteration) (if (> iteration 3) (println "Goodbye!") (recursive-printer (inc