Back to the email P Paul Bredbury January 17, 2026, morning To get length of a list, plus 1: ?- List = [a,b,c], length([_|List], Len1). Len1 = 4. Can use true and false as data values ("terms"), same as yes and no. Prolog is awesome because it is logical and relational. You're not signed in. Posting this comment will subscribe you to this newsletter with the email address you enter below. Reply and Subscribe
To get length of a list, plus 1:
?- List = [a,b,c], length([_|List], Len1). Len1 = 4.
Can use true and false as data values ("terms"), same as yes and no.
Prolog is awesome because it is logical and relational.