RosettaCodeData/Task/Variables/Mercury/variables-6.mercury

7 lines
193 B
Text
Raw Permalink Normal View History

2019-09-12 10:33:56 -07:00
% 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).