Skip to content

Commit

Permalink
Merge pull request #85 from TeamSPoon/main
Browse files Browse the repository at this point in the history
Internal op was the same things as MeTTa  https://github.com/trueagi…
  • Loading branch information
TeamSPoon authored Aug 17, 2024
2 parents a54ba9d + 3914ab0 commit a9789a7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .Attic/metta_lang/metta_eval.pl
Original file line number Diff line number Diff line change
Expand Up @@ -823,9 +823,11 @@
%;; superpose-bind because `superpose` doesnt guarentee shared bindings
% @TODO need to keep bindings
eval_20(Eq,RetType,Depth,Self,['superpose-bind',List],Res):- !,
member(E,List),
re_member(Res,E,List),
eval_ret(Eq,RetType,Depth,Self,E,Res).

re_member(Res,E,List):- term_variables(Res+E+List,TV),copy_term(TV,Copy),
member(E,List),TV=Copy.

%[collapse,[1,2,3]]
eval_20(Eq,RetType,Depth,Self,['collapse',List],Res):-!,
Expand Down Expand Up @@ -1635,12 +1637,12 @@
fromNumber(N,RetVal), check_returnval(Eq,RetType,RetVal).
*/

eval_20(Eq,RetType,Depth,Self,['dedup!',Eval],RetVal):- !,

eval_20(Eq,RetType,Depth,Self,['unique',Eval],RetVal):- !,
term_variables(Eval+RetVal,Vars),
no_repeats_var(YY),!,
no_repeats_var(YY),
eval_20(Eq,RetType,Depth,Self,Eval,RetVal),YY=Vars.


eval_20(Eq,RetType,Depth,Self,PredDecl,Res):-
Do_more_defs = do_more_defs(true),
clause(eval_21(Eq,RetType,Depth,Self,PredDecl,Res),Body),
Expand Down

0 comments on commit a9789a7

Please sign in to comment.