Such operators are available in core.logic.arithmetic. In general such
operations are non-relational and require projection. cKanren offers a
better story here.

On Saturday, May 19, 2012, Brent Millare wrote:

> I understand how to construct goals using the primitives provided in
> core.logic, like a conjunction with fresh or all, and using relations
> defined with defrel. However, I don't really understand the protocols of
> goals once I no longer use these primitives.
>
> How would I define my own comparison like function? Instead of unifying,
> I'd like to do a comparison.
>
> Something like this:
>
> ...
>
> (l/fact person :bob 3)
> (l/fact person :april 2)
>
> (l/run 5 [q]
>     (l/> q 2)
>     (l/fresh [name]
>         (person name q)))
> (3)
>
> What would be the definition for l/>?
>
> --
> 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<javascript:_e({}, 'cvml', 
> '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 <javascript:_e({}, 'cvml',
> 'clojure%2bunsubscr...@googlegroups.com');>
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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