Advertisement
Guest User

Untitled

a guest
Jun 6th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Prolog 0.28 KB | None | 0 0
  1. lists_with_max(Lists, Result) :-
  2.     setof(Max, L^(member(L, Lists), max(L, Max)), Maxes),
  3.     max(Maxes, Max),
  4.     setof(L, (member(L, Lists), member(Max, L)), Result).
  5.    
  6. lists_with_max2(LL, LL1):-
  7.   maplist(max_list, LL, ML),
  8.   max_list(ML, M),
  9.   include(memberchk(M), LL, LL1).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement