I’m using: SWI-Prolog version 8.1.15
I want the code to: be sane
But what I’m getting is: insanity
My code looks like this:
?- 5 > 6.
false. % this looks fine
?- 5 > 4.
true. % this looks fine
?- 5 > [6].
false. % WTF!?
?- 5 > [4].
true. % WTF!?
?- 5 > [4,6].
ERROR: Arithmetic: `[4,6]' is not a function
ERROR: In:
ERROR: [20] throw(error(type_error(evaluable,...),_8180))
ERROR: [17] arithmetic:expand_function([4,6],_8218,_8220) at d:/swipl/library/arithmetic.pl:175
ERROR: [16] arithmetic:math_goal_expansion(5>[4|...],_8264) at d:/swipl/library/arithmetic.pl:159
ERROR: [14] '$expand':call_goal_expansion([system- ...],5>[4|...],_8310,_8312,_8314) at d:/swipl/boot/expand.pl:876
ERROR: [13] '$expand':expand_goal(5>[4|...],_8370,_8372,_8374,user,[system- ...],_8380,[]) at d:/swipl/boot/expand.pl:525
ERROR: [12] setup_call_catcher_cleanup('$expand':'$set_source_module'(user,user),'$expand':expand_goal(...,_8460,_8462,_8464,user,...,_8470,[]),_8434,'$expand':'$set_source_module'(user)) at d:/swipl/boot/init.pl:539
ERROR: [8] '$expand':expand_goal(user:(5> ...),_8514,user:_8536,_8518) at d:/swipl/boot/expand.pl:459
ERROR: [6] setup_call_catcher_cleanup('$toplevel':'$set_source_module'(user,user),'$toplevel':expand_goal(...,...),_8564,'$toplevel':'$set_source_module'(user)) at d:/swipl/boot/init.pl:539
ERROR:
ERROR: Note: some frames are missing due to last-call optimization.
ERROR: Re-run your program in debug mode (:- debug.) to get more detail.
^ Exception: (6) setup_call_catcher_cleanup('$toplevel':'$set_source_module'(user, user), '$toplevel':expand_goal(user:(5>[4, 6]), _6918), _8622, '$toplevel':'$set_source_module'(user)) ? abort
% Execution Aborted
% WTFF!?!?!