I have a set of five functions, that could be called one of five ways. I’m expressing that with patern-matching like so,
type Configure = ReaderT Config IO ()
data Step = PreVal
| PreProc
| Proc
| PostProc
| PostVal
foo :: Step -> Configure
foo PreVal = do some stuff
foo PreProc = do some stuff
and so on bar and baz are set up similarly
I know how to use sequence to call a list of actions. Given a [Step], how could I go about calling [foo,bar,baz]. in sequence, while also calling each possible step.
so it should do this
foo PreVal
foo PreProc
… and so on
bar Preval
bar PreProc
.. and so on
baz …
1 Answer