I'm having trouble translating some Prolog code to core.logic.

In particular, I'd like to do something like this:

2 ?- assert(a(b)).
> true.
> 3 ?- assert(a(a(b))).
> true.
> 4 ?- a(X).
> X = b ;
> X = a(b).
> 5 ?- a(a(X)).
> X = b.


However, the core.logic equivalent doesn't seem to work:

user> (fact a 1)
> nil
> user> (fact a (a 1))
> nil
> user> (run* [q]
>             (a q))
> (1 #<user$eval4021$fn__4022$fn__4023 
> user$eval4021$fn__4022$fn__4023@9c7dc5>)
> user> (run* [q]
>             (a (a q)))
> ()


Does anyone know how to represent those kinds of relations?

Thanks. 

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