On Tue, Aug 2, 2011 at 7:42 AM, octopusgrabbus <octopusgrab...@gmail.com> wrote: > I'm having trouble with the suggested fix (shortened function name for > testing). > > Here is some test data: > (def vv1 [[49 48 47 46 nil 1 2 3 4][5 6 7 8 9 10 11 12 13]]) > > (defn f1 > [all-csv-rows] > (let [clean-rows (vec (filter #(and (pos? (count %)) (not (cstr/ > blank? (nth % 5 nil)))) all-csv-rows) ) ] > clean-rows)) > > This function is returning > > (f1 vv1) > java.lang.RuntimeException: java.lang.ClassCastException: > java.lang.Integer cannot be cast to java.lang.CharSequence > (NO_SOURCE_FILE:0) > addr-verify=>
That's because you're checking integers with a "blank?" function evidently intended for strings. What are you actually wanting to check the integers for? Being zero? There's a function named "zero?" for that. -- Protege: What is this seething mass of parentheses?! Master: Your father's Lisp REPL. This is the language of a true hacker. Not as clumsy or random as C++; a language for a more civilized age. -- 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