I'm going to give filter a shot. On Aug 1, 4:27 pm, Mark Rathwell <mark.rathw...@gmail.com> wrote: > A few more things: > > - I don't know if you want to be passing the start val to reduce in this > case ([]), it's not doing anything here > > - you have the arguments to > backwards. (> 0 2) in prefix is (0 > 2) in > infix notation, so this will always return false in your code since the > vector count will never be less than zero > > - Any reason you can't just use filter ? > > On Mon, Aug 1, 2011 at 4:11 PM, Meikel Brandmeyer <m...@kotka.de> wrote: > > 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
-- 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