Author: abaine Date: Fri Aug 10 20:12:23 2007 New Revision: 134
Added: trunk/funds/src/examples/ trunk/funds/src/examples/sudoku.lisp Log: Added sudoku example file.
Added: trunk/funds/src/examples/sudoku.lisp ============================================================================== --- (empty file) +++ trunk/funds/src/examples/sudoku.lisp Fri Aug 10 20:12:23 2007 @@ -0,0 +1,16 @@ + +(in-package :funds) + +(defun puzzle-from-list (list-rep) + (let ((size (length list-rep))) + (make-f-array (expt size 3) + :initial-contents (mapcan #'(lambda (row) + (mapcan #'(lambda (elt) + (loop for i below size + collect (= i (1- elt)))) + row)) + list-rep)))) + + + +