📄 fig9_10.pl
字号:
% Figure 9.10 Inserting an item as a leaf into the binary dictionary.
% addleaf( Tree, X, NewTree):
% inserting X as a leaf into binary dictionary Tree gives NewTree
addleaf( nil, X, t( nil, X, nil)).
addleaf( t( Left, X, Right), X, t( Left, X, Right)).
addleaf( t( Left, Root, Right), X, t( Left1, Root, Right)) :-
gt( Root, X),
addleaf( Left, X, Left1).
addleaf( t( Left, Root, Right), X, t( Left, Root, Right1)) :-
gt( X, Root),
addleaf( Right, X, Right1).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -