Vector must be a non-empty list, array or collection expression (as accepted by eval_to_list/2). The elements of Vector must be numbers, and Result is the maximum of these numbers (converted to the widest type of the vector elements).
This predicate can be used as a function in arithmetic expressions. In coroutining mode, if the list is only partly instantiated, the predicate delays until the list is complete.
Success:
X is max([1,2,3]). % gives X = 3
X is max([1,2.0,3]). % gives X = 3.0
X is max([](1,2,3)). % gives X = 3
A=[](4,5,6,7), X is max(A[2..3]). % gives X = 6
Error:
X is max([]). % type error