The idea of backtracking is, that you try all options because you can't
tell/calulate in advance which parameters lead to a solution; if you have
some idea about where and how to limit your search, you may save a lot of
time. In your example, you can limit your search by replacing the
Hi all,
Weekly news had a link to article
Local and global side effects with monad transformers
and the following is from there (minor modification done):
import Control.Monad.List
import Control.Monad.State
import Control.Monad.Writer
test5 :: StateT Integer (ListT (Writer [Char])) Integer