On Friday, June 22, 2012 8:28:02 AM UTC-4, Walter Tetzner wrote: > > > (defn read-records > "Read the data from the given reader as a list of strings, where > each string is made up of multiple lines, separated by // on it's own > line." > [reader] > (->> (line-seq reader) > (partition-by #{["//"]}) > (filter (comp not #{["//"]})) > (map (partial apply str)))) > Actually, you want the new lines:
(defn read-records "Read the data from the given reader as a list of strings, where each string is made up of multiple lines, separated by // on it's own line." [reader] (->> (line-seq reader) (partition-by #{["//"]}) (filter (comp not #{["//"]})) (map (partial clojure.string/join "\n")))) -- 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