
Haskell Sudoku solver - 10ren
http://www.cs.tufts.edu/~nr/comp150fp/archive/richard-bird/sudoku.pdf
======
simonista
Really cool to see how this would be done in Haskell, thanks for the link! I
just read through so some of it went over my but seeing how they layout the
mathematical logic was insightful. Here's another great take on the problem
(in python) for those who may not have seen it:
<http://norvig.com/sudoku.html>

------
vito
I wrote a Sudoku puzzle solver in Haskell as practice a while ago, if anyone's
interested the source (including tests and a description of the algorithm) is
here: <http://github.com/vito/sudoku.hs>

~~~
g__
and $ map can be shortened to all in many places.

I'd use pointless style more: row = (!!)

The function valid has a lot of repetition, maybe the repeating part can be
abstracted of?

Instead of length possible > 0, you can use not $ null possible. This is
faster, since it doesn't go through the whole list.

Instead of pattern matching on Maybe (tile), you can use Prelude's maybe.

~~~
vito
Yep. As I said, this is all pretty old and was done as a learning experience.
Thanks though. :)

