I have wondered why I had seen comments that indicated using Clojure vectors and nth good “make a stink” (paraphrased). nth used with vectors is very useful for some operations, but I know realize why accessing vectors this way can be a problem.
I’ve written a small Clojure program that pulls apart a .csv file using clojure-csv. This program uses indexes. The problem is, I thought I would extract only the columns I needed, process the data, and then write out the results. It has resulted in a blur of indexes.
To set the type of application, it is comparing whether a health insurance subscriber is in the town’s application appears in the vendor’s application. It also determines the reverse, which is whether or not every subscriber in the vendor’s application also shows up in the town’s application.
At some point I’ll rewrite this program using zip-map, because each report comes with column names as the first row. What could be better? Then I can access any column I want by name, and not guess the column arrangement of a vector of data.