This predicate maps directly to Gecode's native implementation of the constraint, and may therefore be more efficient, but could also be incompatible with existing ECLiPSe code.
This constraint can be embedded in a constraint expression in its functional form (without the last argument).
See min_first_index/2 for a more detailed description of this predicate.
[eclipse 11]: min_first_index([1,2,3], I). I = 1 [eclipse 12]: min_first_index([1,2,3,1,10,9,10], I). I = 1 [eclipse 13]: L = [A,B,C,D,E], L :: 1..10, min_first_index(L, 3), C #> 4. L = [A{[6 .. 10]}, B{[6 .. 10]}, C{[5 .. 9]}, D{[5 .. 10]}, E{[5 .. 10]}] A = A{[6 .. 10]} B = B{[6 .. 10]} C = C{[5 .. 9]} D = D{[5 .. 10]} E = E{[5 .. 10]} [eclipse 14]: L = [A,B,C,D,E], L :: 1..10, min_first_index(L, 3), B #> 4. L = [A{[2 .. 10]}, B{[5 .. 10]}, C{[1 .. 9]}, D{[1 .. 10]}, E{[1 .. 10]}] A = A{[2 .. 10]} B = B{[5 .. 10]} C = C{[1 .. 9]} D = D{[1 .. 10]} E = E{[1 .. 10]} [eclipse 15]: L = [A,B,C,D,E], L :: 1..10, min_first_index(L, 3), B #< 4. L = [A{[2 .. 10]}, B{[2, 3]}, C{[1, 2]}, D{[1 .. 10]}, E{[1 .. 10]}] A = A{[2 .. 10]} B = B{[2, 3]} C = C{[1, 2]} D = D{[1 .. 10]} E = E{[1 .. 10]} [eclipse 16]: [A,B,D] :: 1..10, C :: 20..30, min_first_index([A,B,C,D], I). A = A{[1 .. 10]} B = B{[1 .. 10]} D = D{[1 .. 10]} C = C{[20 .. 30]} I = I{[1, 2, 4]}