Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % Part 3
- splitlist([H|T],Left,Pivot,Right):-
- (H == Pivot ->
- Right = T;
- splitlist(T,H,Pivot,Right)
- ).
- % splitlist(L, Pivot):-
- % splitlist(L, [], Pivot, []).
- %
- % splitlist([H|T], B, Pivot, C):-
- % splitlist(T,B,Pivot,T).
- %
- splitlist([], Left, Pivot, Right):-
- write("HERE"),
- write(Left).
- %
Advertisement
Add Comment
Please, Sign In to add comment