Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- split(_,[],[],[]) :- !.
- split(A,[H|L],X,[H|Y]) :-
- A<H, !, split(A, L, X,Y).
- split(A,[H|L],[H|X],Y) :-
- split(A, L, X,Y).
- pairadd([_|[]], []) :- !.
- pairadd([A,B|L], [H|X]) :- H is A+B, pairadd([B|L], X).
Add Comment
Please, Sign In to add comment