2014-08-06 9:48 GMT+02:00 Thomas Heller <i...@zilence.net>:

> dotimes is for doing things n times. doseq is for seqs. Use dotimes when
> you can, doseq when you can't.
>

​OK, I thought so, but wanted to be sure.​

And I also use doseq on a place where dotimes would not work:
    (doseq [arrayRange [10 100 1000 2000 5000 10000]]

I still have a lot to learn, but I certainly like the expressiveness of
clojure.



> On Wed, Aug 6, 2014 at 12:13 AM, Cecil Westerhof <cldwester...@gmail.com>
> wrote:
>
>> 2014-08-05 19:04 GMT+02:00 Thomas Heller <th.hel...@gmail.com>:
>>
>> If you don't need the result of the for loop (which you don't in your
>>> example) use doseq.
>>>
>>> Same syntax as "for" but not lazy and no return value (well, nil to be
>>> exact)
>>>
>>
>> ​I already use dotimes, or is doseq better?​
>>
>>
>
-- 
Cecil Westerhof

-- 
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/d/optout.

Reply via email to