RosettaCodeData/Task/Variables/Mercury/variables-6.mercury
2019-09-12 10:33:56 -07:00

6 lines
193 B
Text

% all_under(N, L)
% True if every member of L is less than N
%
:- pred all_under(int::in, list(int)::in) is semidet.
all_under(Limit, L) :-
all [N] (member(N, L) => N < Limit).