David, Would you know the difference between mem-o and member-o in Jim's implementation...? Thanks, Sunil.
On Sat, Nov 6, 2010 at 7:36 AM, Sunil S Nandihalli < sunil.nandiha...@gmail.com> wrote: > Hi David, > I get (20) whether "(& x 10)" is commented out or not.. I was expecting it > to return '() when "(& x 10)" is commented out and (20) when it is not > commented out.. > I might have understood the meaning cond-u not correctly.. > Sunil. > > On Fri, Nov 5, 2010 at 7:16 PM, David Nolen <dnolen.li...@gmail.com>wrote: > >> On Thu, Nov 4, 2010 at 11:36 PM, Sunil S Nandihalli < >> sunil.nandiha...@gmail.com> wrote: >> >>> 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 >>> >> >> What is the output that you are seeing? >> >> 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<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