Hi Jonathon, I'm not sure I fully understand what you're after, but I suspect reduce + reduced would be helpful.
(reduce (fn [a c] (reduced 'foo)) [] [1 2 3]) ;=> 'foo As far as I'm aware you can't exit a doseq early. (Actually I guess you could use a mutable reference as the argument to :while, but reduced is nicer). http://clojuredocs.org/clojure_core/clojure.core/for#example_913 Thanks, Ambrose On Wed, Nov 27, 2013 at 10:26 PM, Jonathon McKitrick <jmckitr...@gmail.com>wrote: > I'm iterating a map (regex -> function) and I'd like to call FUNCTION with > the result of re-groups after a match for REGEX is found. I also want to > exit the sequence, returning the results of FUNCTION. In common lisp, I > would use return-from, but how would this be done in clojure? > > -- > -- > 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 > --- > 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 clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > -- -- 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 --- 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 clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.