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