Skip to content

Instantly share code, notes, and snippets.

;;;; Translation of Peter Norvig's sudoku solver to idiomatic Clojure
;;;; See http://norvig.com/sudoku.html
;;;;
;;;; Throughout this program we have:
;;;; r is a row, e.g. :a
;;;; c is a column, e.g. 3
;;;; s is a square, e.g. [:a 3]
;;;; d is a digit, e.g. 9
;;;; u is a unit, e.g. [[:a 1] [:b 1] [:c 1] ... [:i 1]]
;;;; grid is a grid, e.g. 81 non-blank chars, e.g. starting with ".18...7..."