Hi, I'm trying to wrap my head around functional programming, and I'm having some trouble doing the following:
Here's a small iterator function that I wrote, which calls a function on each element of a vector-of-vectors. (defn v2d-each ([v2d stRow endRow stCol endCol func] (doseq r (range (max 0 stRow) (min (v2d :rows) endRow)) (doseq c (range (max 0 stCol) (min (v2d :cols) endCol)) (func r c (v2d-get v2d r c))))) But this function turned out to be not as useful as I had hoped, because there's no way for me to early exit the iterator (as Clojure doesn't have Ruby's break or return statements) Could I have some help writing this in idomatic Clojure? Thank you very much -Patrick --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---