fixes by Bart and Tom: mostly libraries but nasty one in indexing
compilation. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2286 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
@@ -104,16 +104,11 @@ list_to_tree(List, Tree) :-
|
||||
% a tool for everyday use.
|
||||
|
||||
map_tree(Pred, t(Old,OLeft,ORight), t(New,NLeft,NRight)) :-
|
||||
tree_apply(Pred, [Old,New]),
|
||||
once(call(Pred, Old, New)),
|
||||
map_tree(Pred, OLeft, NLeft),
|
||||
map_tree(Pred, ORight, NRight).
|
||||
map_tree(_, t, t).
|
||||
|
||||
tree_apply(Pred,Args) :-
|
||||
G =.. [Pred,Args],
|
||||
call(G), !.
|
||||
|
||||
|
||||
% put_label(Index, OldTree, Label, NewTree)
|
||||
% constructs a new tree the same shape as the old which moreover has the
|
||||
% same elements except that the Index-th one is Label. Unlike the
|
||||
|
||||
Reference in New Issue
Block a user