fork download
  1. :- set_prolog_flag(verbose,silent).
  2. :- prompt(_, '').
  3. :- use_module(library(readutil)).
  4.  
  5. add_1(X,s(X)).
  6.  
  7. main:-
  8. process,
  9.  
  10. process:-
  11. /* your code goes here */
  12. L=[add_1,s(0),Y],
  13. X=..L,
  14. X,
  15. write(Y),
  16.  
  17. :- main.
Success #stdin #stdout 0.03s 6280KB
stdin
Standard input is empty
stdout
s(s(0))