I get back a vector of vectors from clojure-csv/parse-csv. I want to
remove vectors from that sequence based on the out come of certain
tests on individual vector elements.

Below, get-parsed-csv-file is called first and returns clean-csv-rows.
filter-parsed-csv-rows is called with clean-csv=rows, but is not
returning anything. I'm trying to figure out why.

(defn gen-parsed-csv-file
    "Returns a sequence generated by parse-csv"
    [file-name]
    (let [  data (slurp file-name)
            all-csv-rows        (parse-csv data)
            clean-csv-rows      (if (= 0 (count (first (last all-csv-
rows))))
                                    (drop-last 1 all-csv-rows)
                                    all-csv-rows)]))

(defn filter-parsed-csv-rows
    "Returns cleaned-up parsed csv rows."
    [all-csv-rows]
    (reduce
        (fn [checked-row one-csv-row]
            (if (and (> 0 (count one-csv-row)) ((not (cstr/blank? (nth
one-csv-row 5 nil)))))
                (conj checked-row one-csv-row)))

        []
        all-csv-rows))

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to