Hi!
I find the way a conjunction is represented, eg when using clause/2, a bit confusing.
Suppose i have h:- p, q, r.
With the query clause(h, B).
i get B = (p,q,r)
.
But why does this hide that actually B = ','(p,','(q,r))
as obtained with write_canonical/1?
For me this causes some confusion: E.g. seeing B = (p,q,r)
i am expecting compound_name_arguments(B, N, A)
to yield something empty in N
and just a list of atoms in A
; but instead i get the canonical representation ‘A = [p, (q,r)]’.
Is this just an ideosynchracy of Prolog or am I missing something that motivates having (p, q, r)
instead of [p, q, r]
?
Cheers/JCR