Lately I have been thinking of macros. How else, I thought, could I introduce a variable number of columns (vector indexes) to a function, so that I could extract a number of columns from a .csv file parsed by clojure-csv? Well, I almost got to my goal after re-discovering partial.

So here is a solution for pulling a random number of columns from a sequence, thanks to StackOverflow.com.

All this brings me to my final conclusion. After nearly a year of working with Clojure, I have a fair idea on how to manipulate data. I even saw the range .. count solution, but for the wrong sequence. I envisioned looping through the columns, not the sequence returned by clojure-csv.

For Clojure texts, we have a lot of good books. By the way, Chas Emeric’s Brian Carper’s and Christopher Grande’s Clojure Programming is finally published, and the book covers the kind of sophistication involved in the “get-in” form.

Still, I believe what is now needed for learning Clojure is a “cookbook”. That is how to take higher order functions (HOFs) and constructs to build up to sophisticated solutions.