On Jan 13, 7:35 pm, Ken Wesson <kwess...@gmail.com> wrote:
>
> >    (let [seq-of-fns [f1 f2 f3 ... fm]]
> >         (mapcat fm ... (mapcat f2 (mapcat f1 s)))
>
> > If any of the functions return nil, I'd like the computation to stop.
>
> I don't see any real reason not to use
>
> (reduce #(if %1 (mapcat %2 %1)) s seq-of-fns)
>


That seems to work nicely thanks. I hadn't thought of using reduce to
produce a sequence before.

Saul

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

Reply via email to