Re: clojure-mini kanren implementation of nonvar

2010-11-06 Thread jim
David, That's exactly right. (Pending a review of "The Reasoned Schemer" when I get home) Jim On Nov 6, 11:18 am, David Nolen wrote: > On Sat, Nov 6, 2010 at 5:02 AM, Sunil S Nandihalli < > > sunil.nandiha...@gmail.com> wrote: > > after looking through his source code ... I discovered that repl

Re: clojure-mini kanren implementation of nonvar

2010-11-06 Thread David Nolen
On Sat, Nov 6, 2010 at 5:02 AM, Sunil S Nandihalli < sunil.nandiha...@gmail.com> wrote: > after looking through his source code ... I discovered that replacing > cond-u with cond-a gives me the expected output .. but I am unable to > explain what I have found... > Regards, > Sunil. > mem-o is the

Re: clojure-mini kanren implementation of nonvar

2010-11-06 Thread Sunil S Nandihalli
after looking through his source code ... I discovered that replacing cond-u with cond-a gives me the expected output .. but I am unable to explain what I have found... Regards, Sunil. On Fri, Nov 5, 2010 at 7:16 PM, David Nolen wrote: > On Thu, Nov 4, 2010 at 11:36 PM, Sunil S Nandihalli < > su

Re: clojure-mini kanren implementation of nonvar

2010-11-06 Thread Sunil S Nandihalli
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

Re: clojure-mini kanren implementation of nonvar

2010-11-05 Thread Sunil S Nandihalli
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 wrote: > On

Re: clojure-mini kanren implementation of nonvar

2010-11-05 Thread David Nolen
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 assigne

clojure-mini kanren implementation of nonvar

2010-11-04 Thread Sunil S Nandihalli
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