There are 3 variants which will work
solve([cbc, $min(XSum)], Xs),
or
solve($[cbc, min(XSum)], Xs),
or
solve($[cbc, $min(XSum)], Xs),
What will not work is
solve([cbc, min(XSum)], Xs),
% example code starts
import mip.
% Optimization Goal: Maximize 2X + 3Y
% if a different mip solver, replace cbc with it, i.e., glpk
main =>
% Define variables with their domains
X :: 1..100,
Y :: 1..100,
% Define constraints
X + Y #<= 10,
% '$' converts max()from a function to a term for the solver to use
% with a '$' before the first [] block, the code runs
% solve($[cbc, max(2*X + 3*Y)], [X, Y]),
% with the '$' inside the first block, the code runs
solve([cbc, $max(2*X + 3*Y)], [X, Y]),
% with two '$', before and inside the [], the code runs
% solve($[cbc, $max(2*X + 3*Y)], [X, Y]),
% without the '$', the code generates an error
% solve([cbc, max(2*X + 3*Y)], [X, Y]),
printf("Solution found!\n"),
printf("X = %w, Y = %w\n", X, Y),
printf("Objective Value = %w\n", 2*X + 3*Y).
% code ends