Skip to content

Commit

Permalink
fixed merge conflicts from 7ffac27
Browse files Browse the repository at this point in the history
  • Loading branch information
TeamSPoon committed Sep 1, 2024
1 parent 2fa26e4 commit d72e2d3
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions src/canary/metta_eval.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1898,31 +1898,9 @@
RetVal2^eval_args(Eq,RetType,Depth,Self,Eval2,RetVal2),
RetVal).

<<<<<<< HEAD

eval_20(Eq,RetType,Depth,Self,['union',Eval1,Eval2],RetVal):- !,
lazy_union(RetVal1^eval_args(Eq,RetType,Depth,Self,Eval1,RetVal1),
RetVal2^eval_args(Eq,RetType,Depth,Self,Eval2,RetVal2),
RetVal).


lazy_union(E1^Call1, E2^Call2, E) :-
lazy_findall(E1, Call1, List1), lazy_findall(E2, Call2, List2),
(
member(E, List1)
; (member(E, List2), \+ (member(E1, List1), E1 = E))
).



%% lazy_subtraction(+E1_Call1, +E2_Call2, -E) is nondet.
% - Performs a subtraction operation using lazy evaluation.
% - It subtracts elements generated by Call2 from those generated by Call1.
=======
%% lazy_intersection(:P2, +E1_Call1, +E2_Call2, -E) is nondet.
% - Performs a intersection operation using lazy evaluation.
% - It intersects elements generated by Call2 from those generated by Call1.
>>>>>>> 7ffac2700d8ed4428e4c99e2fc0fa30f4646467a
% Arguments:
% - P2: Any arity 2 predicate
% - E1^Call1: The first goal (Call1) generating elements (E1).
Expand Down Expand Up @@ -1987,28 +1965,6 @@

eval_20(_Eq,_OuterRetType,_Depth,_Self,[P,_,B],_):-P=='/',B==0,!,fail.

<<<<<<< HEAD
write_src_wx( [] ):- !.
write_src_wx( [H|Lis2] ):- !, write( H ), write_src_wx( Lis2 ).

% !(repr (foo 1 2 3))
% !assertEqualToResult( (repr (foo 1 2 3)) "(foo 1 2 3)" )

eval_20( Eq, RetType, Depth, Self, [ 'repr' , L ] , Sxx ):-
eval_args( Eq, RetType, Depth, Self, L, Lis2 ),
with_output_to( string( Sxx ) , write_src_woi( Lis2 ) ).

eval_20( Eq, RetType, Depth, Self, [ 'parse' , L ] , Exp ):-
eval_args( Eq, RetType, Depth, Self, L, Str ),
parse_sexpr_metta1( Str, Exp ),
!.

% phrase( expressions( Expr ), Str ).
% string( Str ), !,
% atom_string( Atox, Str ).
% !(parse "(+ 5 6)")
=======
>>>>>>> 7ffac2700d8ed4428e4c99e2fc0fa30f4646467a

eval_20(Eq,RetType,Depth,Self,['CountElement',L],Res):- !, eval_args(Eq,RetType,Depth,Self,L,LL), !, (is_list(LL)->length(LL,Res);Res=1),check_returnval(Eq,RetType,Res).
eval_20(Eq,RetType,_Dpth,_Slf,['make_list',List],MettaList):- !, into_metta_cons(List,MettaList),check_returnval(Eq,RetType,MettaList).
Expand Down

0 comments on commit d72e2d3

Please sign in to comment.