typos
This commit is contained in:
parent
a2d397976f
commit
7661b8581c
@ -205,6 +205,17 @@ append_([L1,L2|[L3|LL]], L) :-
|
|||||||
append(L1,L2,LI),
|
append(L1,L2,LI),
|
||||||
append_([LI|[L3|LL]],L).
|
append_([LI|[L3|LL]],L).
|
||||||
|
|
||||||
|
% reverse(List, Reversed)
|
||||||
|
% is true when List and Reversed are lists with the same elements
|
||||||
|
% but in opposite orders. rev/2 is a synonym for reverse/2.
|
||||||
|
|
||||||
|
reverse(List, Reversed) :-
|
||||||
|
reverse(List, [], Reversed).
|
||||||
|
|
||||||
|
reverse([], Reversed, Reversed).
|
||||||
|
reverse([Head|Tail], Sofar, Reversed) :-
|
||||||
|
reverse(Tail, [Head|Sofar], Reversed).
|
||||||
|
|
||||||
/** @pred last(+ _List_,? _Last_)
|
/** @pred last(+ _List_,? _Last_)
|
||||||
|
|
||||||
|
|
||||||
|
@ -479,7 +479,6 @@ If this hook preodicate succeeds it must instantiate the _Action_ argument to t
|
|||||||
|
|
||||||
:- yap_flag(user:unknown,error).
|
:- yap_flag(user:unknown,error).
|
||||||
|
|
||||||
:- ensure_loaded('../android.yap').
|
|
||||||
|
|
||||||
|
|
||||||
%% @}
|
%% @}
|
||||||
|
@ -136,14 +136,3 @@ prolog:length(L, M) :-
|
|||||||
|
|
||||||
%% @}
|
%% @}
|
||||||
|
|
||||||
% reverse(List, Reversed)
|
|
||||||
% is true when List and Reversed are lists with the same elements
|
|
||||||
% but in opposite orders. rev/2 is a synonym for reverse/2.
|
|
||||||
|
|
||||||
lists:reverse(List, Reversed) :-
|
|
||||||
lists:reverse(List, [], Reversed).
|
|
||||||
|
|
||||||
lists:reverse([], Reversed, Reversed).
|
|
||||||
lists:reversae([Head|Tail], Sofar, Reversed) :-
|
|
||||||
lists:reverse(Tail, [Head|Sofar], Reversed).
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user