[funds-cvs] r134 - trunk/funds/src/examples
abaine at common-lisp.net
abaine at common-lisp.net
Sat Aug 11 00:12:23 UTC 2007
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))))
+
+
+
+
More information about the Funds-cvs
mailing list