More of an inquiry into the "fp mindset as opposed to the procedural one" than anything else ...
If I got this right, there are two forms of iterations: internal and external. `map' is an "internal iterator", `doseq' is an "external iterator". An "internal iterator" does the iteration "by itself" and applies some provided fn to the collection, possibly resulting into some new collection. An "external iterator" provides you with the "closest access" to the collection, allowing you to decide for yourself what you want to do "inline" on an element by element basis, possibly deciding on a course of actions depending on the values seen so far, which would be more difficult to do with an "internal iterator" such as `map', because the fn would need to be passed those "previous values of interest" as arguments each time. Now, if I summarize the set of clojure provided iterations forms I get the internal ones such as `map' or 'reduce', the external ones such as `doseq' or `dotimes', plus, via loop/recur the means by which to implement my own "internal iterators" in the `map'/`reduce' vein. The question then is: is this all there is to iteration? And if any external iterator beyond `doseq' and `dotimes` is missing, what would they be? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---