I believe the reason it's not recommended is because it returns a lazy
chunked sequence. This means that it's not guaranteed to eagerly perform
your side-effects, unless you wrap it in `doall`.

On Wed, Sep 2, 2015 at 8:48 AM, James Elliott <brunch...@gmail.com> wrote:

> I notice that the documentation for filter and filterv are emphatic that
> the predicate you are using be free of side effects. Why is that so? For
> example, I would like to use filterv to collect a list of lighting
> effects which respond false to a protocol method which asks whether they
> have finished. In the implementation of that method, the effects are free
> to update their internal state based on the current show state and time,
> when deciding whether or not they are finished, and so I can’t guarantee
> there will be no side effects while filtering the effects. Does that mean I
> can’t use filterv? If not, why not? Looking at the source, I see no
> obvious problems.
>
> --
> 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.
>

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