Code:
[mia, vincent, jules, yolanda].
[mia, [vincent, jules], [butch, girlfriend(butch)]].
% uncommenting the below line gives an error:
% [mia, vincent, X].
According to my book and different sites on the internet, it's perfectly fine to include variables in prolog lists yet on loading the above knowledge base I get the following error:
ERROR: /home/user/Prolog/det/lists.pl:7:
Arguments are not sufficiently instantiated
ERROR: /home/user/Prolog/det/lists.pl:7:
Arguments are not sufficiently instantiated
In:
Arguments are not sufficiently instantiated
Arguments are not sufficiently instantiated
In:
[31] throw(error(instantiation_error,_4850))
[27] '$load_file'('/home/user/Prolog/det/lists.pl','/home/user/Prolog/det/lists.pl',_4878,[expand(false),...]) at /usr/lib/swi-prolog/boot/init.pl:2507
[26] setup_call_catcher_cleanup(system:true,system:'$load_file'('/home/user/Prolog/det/lists.pl','/home/user/Prolog/lab4/lists.pl',_4946,...),_4924,system:'$end_consult'(...,user)) at /usr/lib/swi-prolog/boot/init.pl:443
[22] '$do_load_file_2'(lists,'/home/user/Prolog/lab4/lists.pl',user,compiled,[expand(false),...]) at /usr/lib/swi-prolog/boot/init.pl:2124
[19] '$mt_do_load'(<clause>(0x55a555ed3400),lists,'/home/user/Prolog/lab4/lists.pl',user,[expand(false),...]) at /usr/lib/swi-prolog/boot/init.pl:2070
[18] setup_call_catcher_cleanup(system:with_mutex('$load_file',...),system:'$mt_do_load'(<clause>(0x55a555ed3400),lists,'/home/user/Prolog/det/lists.pl',user,...),_5084,system:'$mt_end_load'(<clause>(0x55a555ed3400))) at /usr/lib/swi-prolog/boot/init.pl:443
[7] <user>