Hi,
depending on the length of your function sequence you might run into stack
overflows, though. Just keep that in mind (or add a tactically placed doall).
Sincerely
Meikel
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, sen
On Jan 13, 7:35 pm, Ken Wesson 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-
On Thu, Jan 13, 2011 at 3:18 AM, Saul Hazledine wrote:
> Hello,
> I've never used monads but I have a problem that feels like it could
> be solved elegantly with them.
>
> I have a sequence of functions of arbitary size and an input sequence
> s. Each function is given a sequence and returns a s
On Jan 13, 9:18 am, Saul Hazledine wrote:
> Hello,
> I've never used monads but I have a problem that feels like it could
> be solved elegantly with them.
>
> I have a sequence of functions of arbitary size and an input sequence
> s. Each function is given a sequence and returns a sequence that
Hello,
I've never used monads but I have a problem that feels like it could
be solved elegantly with them.
I have a sequence of functions of arbitary size and an input sequence
s. Each function is given a sequence and returns a sequence that can
be bigger than the input sequence. I want the out