Prolog beginner, member/2 builtin predicate -
i have this:
someuserdef(a,[b,c,d]).
when try
?- someuserdef(a,l),member(b,l).
i don't true or false answer list
l=[b,c,d] ; false.
how true or false answer?
you're asking prolog give value of l
matches both rules. if can tell there's 1 answer, return yes
- otherwise give first answer, return no
, , prompt before checking more answers.
when you're providing variables (capital letters) prolog queries, return matches - it's when ask check rules (with no variables) e.g. someuserdef(b, [b, c, d])
return yes
or no
indicate whether assertion true or false.
Comments
Post a Comment