Hi,

Am 01.08.2011 um 21:55 schrieb octopusgrabbus:

> 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.

You can't easily slice out elements from the middle of a vector. You will have 
to reconstruct the vector. Simplest is to go the sequence route.

(defn filter-parsed-csv-rows
  [all-csv-rows]
  (vec (filter #(and (pos? (count %)) (not (cstr/blank? (nth % 5 nil)))) 
all-csv-rows)))

> 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.

It's because you return nil when your predicate isn't fulfilled. You have to 
return checked-row in the else branch of the if.

Hope that helps.

Sincerely
Meikel

-- 
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