<div dir="ltr">Is there a function foo that does<div><br></div><div>foo :: a -> [a -> m a] -> a</div><div><br></div><div>So </div><div><br></div><div>foo 3 [x,x,x] = return 3 >>= x >>= x >>= x<br></div><div><br></div><div>I don't think replicateM and sequence do this. At least I can't figure it out.</div></div>