On Tue, Aug 7, 2012 at 6:46 AM, Jim - FooBar(); <jimpil1...@gmail.com>wrote:

> (defn bishop-moves [x y]
>   (let [xmax 8 ymax 8]
>     (run* [q]
>       (fresh [a b]
>         (< a xmax)
>         (< b ymax)
>         (=  (- x a)
>               (- y b))
>
>   (== q [a b])))))
>

(= (- x a) (- y b))

Is not going to work. You probably want.

(project [x y a b]
  (== (- x a) (- y b)))

Though of course isn't relational. This kind of thing is probably now
better handled by the new CLP(FD) functionality. I'm planning on adding
some sugar / inference to make this kind of thing less tedious.

David

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to