Hi! On Jun 24, 12:04 pm, ka <sancha...@gmail.com> wrote: > To my naive inexperienced eyes, there doesn't seem to be something > obviously wrong with your code. > > > Since FOR returns a lazy sequence of the results, is this function > > safe? (Seeing that it is not side-effect free?) > > I'm not getting this, do you foresee any safety issues? I think that > the logs will be created as you're writing to the out.csv. If you > want the logs be written before you start writing to out.csv, you may > realize the lazy-seq for returns. >
I am creating log entries as I read the lines. My worry was that I might get the log writer being interrupted in the middle of a line write. This I figure will be easily handled by the agent in the logger package. (I have perused the logging code and found that the agent is used to serialize write requests. So the code will work fine.) > > BTW: > > clojure.contrib.loggingindicates that it can use an agent for > > logging. Is my assumption that invoking the logger (with or without > > an agent) within a function would still mean that the function has > > side-effects correct? > > Yes, any change in state or IO means side effect. > > - Thanks Thanks. Martin. -- 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