We had another successful meeting at HacDC’s workshop on Saturday. We covered functional programming, walking through the concepts in the chapter from Programming Clojure and then putting them to work in translating a decision tree modeling program from Python to Clojure: watch for a separate announcement on how we will continue to work on that. We had an especially good time unraveling this bit of code…
(def head-fibo (lazy-cat [0 1] (map + head-fibo (rest head-fibo))))
…and understanding what’s less than optimal about it: that it keeps a reference to the head of a lazy sequence, and thus
(nth head-fibo x) fails for large values of
Next, we’ll tackle macros on April 4th, at 1PM, at HacDC’s workshop. The reading is Chapter 7 of Programming Clojure. We’ll be looking at simple implementations of
defmacro and reviewing different uses for macros. We may also tackle a bit of Paul’s proposed templating language, putting what we’ve learned to use. Hope to see you there!