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
attaches the docstring to the following list, not to the Var.
Another note: for functions with only one argument vector you
don't need the enclosing ().

(defn init-sheet
  "Initialise a worksheet with a particular month"
  [current-month]
  ...)

;For my own reference--this is an example of a Clojure sequence
comprehension
(for [current-month [months]]
        (let [current-sheet (init-sheet current-month)])
)

Yes. for is a list comprehension and not a looping construct.
And as others pointed out: for is lazy. When you really need
looping for side-effects look for doseq. If you also need the
results look for dorun or doall.

Sincerely
Meikel

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to