Re: A question about lazy seq with io

2014-01-13 Thread Kashyap CK
Thank you very very much Jan idiomatic is what I need to learn :) Regards, Kashyap On Tuesday, January 14, 2014 12:47:19 AM UTC+5:30, Jan Herich wrote: > > As Mauricio already mentioned, map is not meant to be used for > side-effects, if you want to need to evaluate a sequence for side-effec

Re: A question about lazy seq with io

2014-01-13 Thread Jan Herich
As Mauricio already mentioned, map is not meant to be used for side-effects, if you want to need to evaluate a sequence for side-effects, use doseq instead. Regarding your first question about explicit loop-recur, i think it's reasonable w

Re: A question about lazy seq with io

2014-01-13 Thread Kashyap CK
Thanks Mauricio ... I think I understand it now. Regards, Kashyap On Monday, January 13, 2014 9:48:28 PM UTC+5:30, Mauricio Aldazosa wrote: > > > > On Mon, Jan 13, 2014 at 8:49 AM, Kashyap CK > > wrote: > >> >> I'd really appreciate it if someone could tell me what's going on when I >> do the fo

Re: A question about lazy seq with io

2014-01-13 Thread Mauricio Aldazosa
On Mon, Jan 13, 2014 at 8:49 AM, Kashyap CK wrote: > > I'd really appreciate it if someone could tell me what's going on when I > do the following - > > user> (defn xx [] (map println [1 2 3 4 5 6])) > #'user/xx > user> (take 2 (xx)) > (1 > 2 > 3 > 4 > 5 > 6 > nil nil) > user> > There are many t

A question about lazy seq with io

2014-01-13 Thread Kashyap CK
Hi, I've been dabbling with Clojure for a bit and I am really loving it!!! I am trying to write a clojure program to download a bunch of URLs and I was wondering what is the right way to do it - My current implementation is as follows (def url-sequence (map #(str "http://www.mysite.com/list.php