3 ms·
These notes explain the logic monad by solving solve n-queens with it: https://github.com/sshastry/queenslogic https://github.com/sshastry/queenslogic Despite i
by danidiaz 10y ago
These notes explain the logic monad by solving solve n-queens with it: https://github.com/sshastry/queenslogic https://github.com/sshastry/queenslogic Despite its name, it's more of a search monad, it doesn't perform unification or anything like that.
Another interesting paper is "Monad transformers for backtracking search" https://arxiv.org/abs/1406.2058 https://arxiv.org/abs/1406.2058
The Select monad described in the later paper can be found in the "transformers" library http://hackage.haskell.org/package/transformers-0.5.4.0/docs/Control-Monad-Trans-Select.html http://hackage.haskell.org/package/transformers-0.5.4.0/docs...
- ocharles 10y agoOh neat, I didn't know Ross had actually released a version of transformers with Select. Now I've got to go learn it.