[Haskell-cafe] Combining State and List Monads
nadine.and.henry at pobox.com
Sat Aug 25 06:35:37 CEST 2012
It seems to me there should be some simple way of doing this, but thus
far it eludes me. I am trying to combine the State and List monads to
do the following:
countCalls = do
a <- [1..2]
b <- [1..2]
where with some combination of ListT, StateT, List, State, or who
knows what would result in:
assuming we initialize the state to 0
Is there any way to make this happen?
Thanks in advance.
More information about the Haskell-Cafe