On Feb 1, 12:16 am, Meikel Brandmeyer wrote:
> Hi,
>
> Am 01.02.2009 um 03:26 schrieb Onorio Catenacci:
>
> > (defn init-sheet
> > #^{:doc "Initialize a worksheet with a particular month"}
> > ([current-month]
> > (if debugging (println "In init-sheet"))
> > )
> > )
>
> You do
Hi,
Am 01.02.2009 um 03:26 schrieb Onorio Catenacci:
(defn init-sheet
#^{:doc "Initialize a worksheet with a particular month"}
([current-month]
(if debugging (println "In init-sheet"))
)
)
You don't need #^ to attach the docstring. In fact your version
> ;For my own reference--this is an example of a Clojure sequence
> comprehension
> (for [current-month [months]]
> (let [current-sheet (init-sheet current-month)])
> )
Two things:
- I think you want (for [current-month months] ...
As-is, this will loop a single time, binding current-
On Sat, Jan 31, 2009 at 8:26 PM, Onorio Catenacci wrote:
>
> Hi all,
>
> I feel like a bloody noob for having to ask this (I've been coding C++
> for years but Clojure, Lisp and Java are all new territory for me) but
> I'm missing something obvious and basic here and I'm still struggling
> with t
Hi all,
I feel like a bloody noob for having to ask this (I've been coding C++
for years but Clojure, Lisp and Java are all new territory for me) but
I'm missing something obvious and basic here and I'm still struggling
with the syntax a bit.
I'm trying to learn clojure by simply translating an