How to use list constructors (./2) in SWI-Prolog

Viewed 525

I am trying to use list constructor in SWI-Prolog, but am getting 'dict' expected error.

For example,

.(a, []) == [a].

ERROR: Type error: `dict' expected, found `a' (an atom)
ERROR: In:
ERROR:   [11] throw(error(type_error(dict,a),_14808))
ERROR:   [10] '$type_error'(dict,a) at /Applications/SWI-Prolog.app/Contents/swipl/boot/init.pl:3369
ERROR:    [9] '$dicts':'.'(a,[],_14874) at /Applications/SWI-Prolog.app/Contents/swipl/boot/dicts.pl:46
ERROR:    [8] '<meta-call>'(user:(...,...)) <foreign>
ERROR:    [7] <user>
Exception: (9) '.'(a, [], _14200) ? 

Could anyone help me configure this functionality?

2 Answers
Related