On Aug 25, 1:56 pm, Chouser <[EMAIL PROTECTED]> wrote:
> On Mon, Aug 25, 2008 at 1:41 PM, Allen Rohner <[EMAIL PROTECTED]> wrote:
>
> > Another option would be to give a different name to the new function,
> > and deprecate doseq at some point in the future. Clojure is still
> > fairly new, and I'd hate to see these kinds of things solidify too
> > early.
>
> A new name -- like dofor?
>
> (defmacro dofor [& body]
> `(dorun (for [EMAIL PROTECTED])))
>
> Then instead of (doseq i (range 10) (println i)
> you can instead say (dofor [i (range 10)] (println i)
>
> ...plus you could do:
>
> (dofor [i (range 1 9)
> j (range 1 9)
> :when (= 0 (rem i j))]
> (println i j)
>
Right, we discussed dofor/doseqs a while back on the IRC, it being an
imperative version of for, with all of its bells and whistles.
But the more general question would be one of making all forms with
binding lists consistent - I think there may be others too.
Rich
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---