fork download
  1. maxList([[_,_,Max,_,_]], Max). /* List of one element */
  2. maxList([[_,_,A,_,_]|F], Max):- maxList(F, B), Max is max(A, B).
  3.  
  4. :- maxList([[1,3,4,5,6], [2,4,5,15,16]], X), write(X).
  5.  
Success #stdin #stdout #stderr 0.02s 6160KB
stdin
Standard input is empty
stdout
5
stderr