Re: Tracing with out using trace?




Bruce Horrocks <news@xxxxxxxxxxxxxxxxx> writes:


I want my friend to be able to specify his own rules without having
to worry about my drawing bit.

What about:

grandparent([Grandparent,Parent,Child]) :-
parent(Grandparent, Parent),
parent(Parent, Child).

Yielding:

?- grandparent(Ls).

Ls = [gramps, homer, bart] ;

and generalising the drawing bit to handle such extended relations
represented as lists? You can keep the old rule as well and use it to
draw the corresponding binary relation.


All the best,
-- Markus Triska
.



Relevant Pages

  • Re: Tracing with out using trace?
    ... and generalising the drawing bit to handle such extended relations ... represented as lists? ...
    (comp.lang.prolog)
  • Re: New songs by eldafyre. acoustic guitar and vocals.
    ... If a five-year-old child brings me a drawing that's really awful, ... sufficiently positive attitude that he'll try a few more. ... "It sucks". ...
    (alt.guitar.beginner)
  • Re: New songs by eldafyre. acoustic guitar and vocals.
    ... If a five-year-old child brings me a drawing that's really awful, ... sufficiently positive attitude that he'll try a few more. ... "It sucks". ...
    (alt.guitar.beginner)
  • Re: Toddler and stairs
    ... If you want a child to listen, ... "When you finish the drawing, ... Stay calm even when your child is not calm. ... that can be heard unless someone listens .. ...
    (misc.kids)
  • Re: slrn: lost thread lines
    ... 'tree' structure that shows relation between parent, current and child ... was no trouble with line drawing. ...
    (news.software.readers)