On Fri, Jul 8, 2011 at 7:05 PM, Christopher <[email protected]> wrote: > ;; mapper.clj > > (use ['clojure.java.io :only '(reader)]) > (use ['clojure.string :only '(split)]) > > (defn mapper [lines] > (doseq [line lines] > (doseq [word (split line #"\s+")] > (println (str word "\t1"))))) > > (mapper (line-seq (reader *in*)))
Try (set! *warn-on-reflection* true) at your REPL and then evaluating the above. One of the commonest causes of slow Clojure performance is reflection, which can generally be avoided with judicious application of type hints. -- 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 [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
