<div dir="ltr"><div>Hi -</div><div><br></div><div>How can I generalize the following pattern to an arbitrary list of functions ?</div><div><br></div><font face="monospace">compose :: (Monad m) => (Foo -> m Foo) -> (Foo -> m Foo) -> (Foo -> m Foo) -> Foo -> m Foo<br>compose f1 f2 f3 acc = do<br>  a <- f1 acc<br>  b <- f2 a<br>  f3 b</font><div><br></div><div>Any help please ..</div><div>regards.<br></div><div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Debasish Ghosh<br><a href="http://manning.com/ghosh2" target="_blank">http://manning.com/ghosh2</a></div><div><a href="http://manning.com/ghosh" target="_blank">http://manning.com/ghosh</a><br></div><div><br>Twttr: @debasishg<br>Blog: <a href="http://debasishg.blogspot.com" target="_blank">http://debasishg.blogspot.com</a><br>Code: <a href="http://github.com/debasishg" target="_blank">http://github.com/debasishg</a></div></div></div></div></div>