> On Jan 31, 2018, at 2:15 PM, George Neuner <gneun...@comcast.net> wrote: > > > On 1/31/2018 2:10 PM, Sam Caldwell wrote: >> Your definition of `ancestor` is one or two steps of parentage: >> >> > ancestor(A, B) :- parent(A, B). >> > ancestor(A, B) :- >> parent(A, C), >> parent(C, B). >> >> I suspect you want one of those lines to appeal to the `ancestor` relation >> to allow longer chains. > > Knowing nothing about datalog he asks naively: > > Shouldn't the rule ancestor(A, B) :- parent(A, C), parent(C, B). be > applied recursively?
It is — except that there’s no recursion. > Kevin's definition would work in Prolog. No it wouldn’t. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.