Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Prolog 0.23 KB | None | 0 0
  1. addX([], [], []).
  2. addX([L], X, Y) :- X is [L|X].
  3. addX([L|Ls], X, Y) :- addY(Ls, [L|X], Y).
  4.  
  5. addY([], [], []).
  6. addY([L], X, Y) :- Y is [L|Y].
  7. addY([L|Ls], X, Y) :- addX(Ls, X, [L|Y]).
  8.  
  9. divlist(C1, C2) :- addX([a,b,c,d,e], C1, C2).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement