Hi -

How can I generalize the following pattern to an arbitrary list of functions ?

compose :: (Monad m) => (Foo -> m Foo) -> (Foo -> m Foo) -> (Foo -> m Foo) -> Foo -> m Foo
compose f1 f2 f3 acc = do
  a <- f1 acc
  b <- f2 a
  f3 b

Any help please ..
regards.

--