On Jun 2, 2014, at 4:52 PM, Phillip Lord <phillip.l...@newcastle.ac.uk> wrote:

> Funny, I posted an article of my Clojure gotcha's today 
> (http://www.russet.org.uk/blog/2991), and this is one of them. I've also had 
> very nasty bugs, in addition to the general hassle of wrapping a Java API 
> which works through side-effects.
> 
> I created a few functions covering the most common ones (domap, dofor and so 
> on); having a comprehensive list somewhere in it's own namespace would be 
> quite useful.
> 
> Phil

It'd be nice to have a solid library of non-lazy alternatives to the core 
sequence functions.

FWIW while I've often dealt with this issue by using vectors, either with an 
explicit vec or with mapv or filterv, it's often not necessary or helpful for 
me that my sequences are actually vectors. That is, they could often be lists 
or some other kind of sequence instead. It's hard for me to know for sure, but 
I think that in many cases a "doall" solves the same problem that a "vec" 
would. This seems to be the case, for example, for the code/fix that I posted.

 -Lee

-- 
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