📄 union.pl
字号:
% This buffer is for notes you don't want to save.
% If you want to create a file, visit that file with C-x C-f,
% then enter the text in that file's own buffer.
%uni(+SETA,+SETB,-SETC).
%method1
%uni(A,[],A).
%uni(A,[H|T],[H|B]):-uni(A,T,B),not(member(H,A)).
%uni(A,[H|T],B):-uni(A,T,B), member(H,A).
%method2
%uni(A,B,X):-union(A,B,X).
uni(A,[],A).
uni(A,[HB|TB],[HB|TC]):-uni(A,TB,TC),not(member(HB,A)).
uni(A,[HB|TB],TC):-uni(A,TB,TC), member(HB,A).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -