On Sat, Jun 8, 2013 at 12:53 AM, Steven D. Arnold <[email protected]> wrote: > (defn filter-file > [] > (with-open [rdr (reader "/Users/thoth/wordlist.txt")] > (flatten > (for > [line (line-seq rdr)] > (filter > (and #(<= (count %) 9) > #(>= (count %) 4)) > (split line #"\s+")))))) > > The error is below. The 'ha-ha' and 'splenetic' are the first couple words > in the wordlist. In case you're wondering, they come from dictionary.com's > previous words of the day.
Wrap flatten in a doall so the lazy sequence is realized before the with-open closes the stream. Lars Nilsson -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] 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 unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
