[semidet]min_member(:Pred,
-Min, +List)True when Min is the smallest member according to Pred,
which must be a 2-argument callable that behaves like (@=<
)/2.
Fails if List is empty. The following call is equivalent to max_member/2:
?- min_member(@=<, X, [6,1,8,4]).
X = 1.
- See also
- min_list/2 for the
minimum of a list of numbers.