master
Matthew Butterick 4 years ago
parent 5c0e3efc07
commit 2c6cb2f3ad

@ -70,7 +70,7 @@
(define prob (make-csp)) (define prob (make-csp))
(define colidxs (range (length cols))) (define colidxs (range (length cols)))
(add-vars! prob colidxs (range (length predicates))) (add-vars! prob colidxs (range (length predicates)))
(add-all-diff-constraint! prob #:proc eq?) (add-all-diff-constraint! prob #:same eq?)
(for ([colidx (in-list colidxs)]) (for ([colidx (in-list colidxs)])
(add-constraint! prob (add-constraint! prob
(λ (predidx) (andmap (list-ref predicates predidx) (λ (predidx) (andmap (list-ref predicates predidx)