Hello everybody,
I know that mini-kanren does not have "nonvar" I was trying to emulate its
effect by using
(cond-u
((& x :unassigned)
fail)
(succeed))
The idea is if x is not assigned it would successfully unify with
:unassigned (ofcourse I am assuming that none of the valid values can be
:unassigned ). So since I am using cond-u it would commit to the first
clause in which the first predicate would succeed and the next predicate
always fails hence it would fail..
(run q
(exist [x]
(& x 10)
(cond-u
((& x :unassigned)
fail)
(succeed))
(& q 20)))
I tried the above code it is not having the expected behaviour .. Can
somebody help me with this ..?
Thanks,
Sunil.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en