RosettaCodeData/Task/Dinesmans-multiple-dwelling-problem/EchoLisp/dinesmans-multiple-dwelling-problem-4.echolisp
2016-12-05 23:44:36 +01:00

13 lines
466 B
Text

;; add a name/floor
(define names '("baker" "cooper" "fletcher" "miller" "smith" "antoinette"))
(define (constraints floors H)
;; ... same as above, add the following
;; Antoinette does not like 💔 Smith
(amb-require (not (touch "smith" "antoinette")))
;; Antoinette is very close ❤️ to Cooper
(amb-require (touch "cooper" "antoinette"))
;; Antoinette wants a prime numbered floor
(amb-require (prime? (floor "antoinette")))
)