eval_selfless_0(E,R):- eval_selfless_2(E,R). allow_clp:- false_flag. eval_selfless_1([F|XY],TF):- allow_clp, \+ ground(XY),!,fake_notrace(args_to_mathlib(XY,Lib)),!,eval_selfless3(Lib,[F|XY],TF). eval_selfless_1(['>',X,Y],TF):-!,as_tf(X>Y,TF). eval_selfless_1(['<',X,Y],TF):-!,as_tf(X',X,Y],TF):-!,as_tf(X>=Y,TF). eval_selfless_1(['<=',X,Y],TF):-!,as_tf(X=',X,Y],TF):-!,as_tf(X#>Y,TF). %compare_selfless0(clpfd,['<',X,Y],TF):-!,as_tf(X#',X,Y],TF):-!,as_tf(X#>=Y,TF). compare_selfless0(clpfd,['<=',X,Y],TF):-!,as_tf(X#=',X,Y],TF):-!,as_tf(Lib:{X>Y},TF). compare_selfless0(Lib,['<',X,Y],TF):-!,as_tf(Lib:{X',X,Y],TF):-!,as_tf(Lib:{X>=Y},TF). compare_selfless0(Lib,['<=',X,Y],TF):-!,as_tf(Lib:{X=!;true). :- dynamic(is_metta_type_constructor/3). curried_arity(X,_,_):- var(X),!,fail. curried_arity([F|T],F,A):-var(F),!,fail,len_or_unbound(T,A).