|
1931 | 1931 | arity_args(Args,[OneArg]), should_be(iz_conz,OneArg), must_unify(OneArg,[H|T]). |
1932 | 1932 | eval_20(_Eq,_RetType,_Depth,_Self,['cons-atom'|TwoArgs],[H|T]):-!, |
1933 | 1933 | arity_args(TwoArgs,[HH,TT]), should_be(iz_conz,TT),H=HH,T=TT,must_unify(TwoArgs,[H,T]). |
| 1934 | + |
| 1935 | + |
| 1936 | + |
| 1937 | +should_be(P1,Term):- call(P1,Term)-> true ; (debug_info(compatability_warning,hyperon_throws_error(should_be(P1,Term))),fail). |
| 1938 | + |
1934 | 1939 | % NEW |
1935 | 1940 | eval_20(_Eq,_RetType,_Depth,_Self,['decons',OneArg],[H,T]):- !, must_unify(OneArg,[H|T]). |
1936 | 1941 | eval_20(_Eq,_RetType,_Depth,_Self,['cons'|TwoArgs],[H|T]):-!, must_unify(TwoArgs,[H,T]). |
1937 | 1942 |
|
1938 | | - |
1939 | | -should_be(P1,Term):- call(P1,Term). |
1940 | | - |
1941 | 1943 | %eval_20(Eq,RetType,Depth,Self,['get-doc'|Args],Res):- !,with_all_spaces(eval_args(Eq,RetType,Depth,Self,['metta-get-doc'|Args],Res)),!. |
1942 | 1944 | %eval_20(Eq,RetType,Depth,Self,['help!'|Args],Res):-!,with_all_spaces(eval_args(Eq,RetType,Depth,Self,['metta-help!'|Args],Res)),!. |
1943 | 1945 |
|
|
0 commit comments