Something I wanted to mention is that this could provide a use case
for an Scheme style cond macro, especially if the processing logic got
more involved -- have a look at my scond if you'd like:

http://gist.github.com/293212

Basically this would allow you to write things like

(scond [(re-matches first-regex line) :>> process-result-1]
          [(re-matches second-regex line) :>> process-result-2]
          [(re-matches third-regex line)] ; return the matches without
further processing, if any
          [:else (give-up)])

Although I suppose Meikel Brandmeyer's pointer may be more clojuresque...

To redeem myself after proposing something so nonidiomatic, I'd like
to point out that instead of wrapping the for in a dorun, you could
replace the for with doseq. :-)

Sincerely,
Michal

-- 
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

Reply via email to