
13 Sep
2006
13 Sep
'06
5:51 p.m.
Michael Shulman wrote:
class MonadList m where option :: [a] -> m a
[...] There's no need for an extra class, it can be done with MonadPlus: option :: MonadPlus m => [a] -> m a option = msum . map return This definition came up before, for example here: http://www.haskell.org/haskellwiki/Sudoku enjoy, Bertram