↧
Answer by Alan Thompson for How to update an atom from multiple future(s) in...
Besides using run!, another handy trick is to use mapv in place of map everywhere. mapv always produces a vector result and is not lazy. This removes many lazy/timing related problems when debugging,...
View ArticleAnswer by cfrick for How to update an atom from multiple future(s) in Clojure?
map in your checkall-futures is lazy. You need something that forces the deref on all items. E.g. use run! instead of map there.
View ArticleHow to update an atom from multiple future(s) in Clojure?
I was trying to do the following exercise from Brave Clojure book:Create a function that uses futures to parallelize the task of downloading random quotes from http://www.braveclojure.com/random-quote...
View Article