i have a to write a routine which lists all descendants so far i wrote
descend(X,Y) :- child(X,Y).
descend(X,Y) :- child(X,Z), descend(Z,Y).
which works fine so any descendent i need to find i just do descend(X,name). and it keeps giving me descendants of name in form of X= descend1, X = descend2 but to get the results i have to press ; every time what i am trying is to write is a routine descendb which gives the list of all descends without pressing ;
descendb(X) :- descend(A,X), write(A).
this is obviously wrong.