fork download
  1. :- set_prolog_flag(verbose,silent).
  2. :- prompt(_, '').
  3. :- use_module(library(readutil)).
  4.  
  5. :-op(600,xfx,add).
  6. a add b.
  7. b add c.
  8. b add d.
  9.  
  10. main:-
  11. process,
  12.  
  13. process:-
  14. /* your code goes here */
  15. X add Y,
  16. Y add Z,
  17. write([X,Z]),
  18. false.
  19. process.
  20. :- main.
Success #stdin #stdout 0.04s 6316KB
stdin
Standard input is empty
stdout
[a,c][a,d]