fork download
  1. :- set_prolog_flag(verbose,silent).
  2. :- prompt(_, '').
  3. :- use_module(library(readutil)).
  4.  
  5. splt([],[],[]).
  6. splt([(X1,Y1)|Xs],[X1|T1],[Y1|T2]):-
  7. splt(Xs,T1,T2).
  8.  
  9. main:-
  10. process,
  11.  
  12. process:-
  13. /* your code goes here */
  14. splt([('a',1),('b',2),('c',3)],L3,L4),
  15. write(L3),
  16. write(L4),
  17.  
  18. :- main.
Success #stdin #stdout 0.04s 7468KB
stdin
Standard input is empty
stdout
[a,b,c][1,2,3]