Hi fellow SWI-Prolog users,
I am trying to represent a list in Prolog. According to Programming for Artificial Intelligence book (Ivan Bratko) a list can be both represented in the normal representation as the inherent one provided by Prolog (as a tree).
For example: a list of elements a,b,c:
Should be possible to represent by List = [a,b,c] OR List = .(a, .(b, .(c,[]) ) ).
But using the second representation on the command line generates the mentioned error: ERROR: Type error: `dict' expected, found `c' (an atom)
Does anyone have an idea why?