fork download
  1. :- set_prolog_flag(verbose,silent).
  2. :- prompt(_, '').
  3. :- use_module(library(readutil)).
  4.  
  5. main:-
  6. process,
  7.  
  8.  
  9. and(t, t, t).
  10. and(t, f, f).
  11. and(f, t, f).
  12. and(f, f, f).
  13.  
  14. and_list([], [], []).
  15. and_list([H1|T1], [H2|T2], [R|RT]) :-
  16. and(H1, H2, R),
  17. and_list(T1, T2, RT).
  18.  
  19.  
  20. process:-
  21. and_list([t,t,t,f,t], [f,f,t,f,f], R),
  22. write(R),
  23. nl,
  24.  
  25. :- main.
Success #stdin #stdout 0.04s 7424KB
stdin
Standard input is empty
stdout
[f,f,t,f,f]