it is my implementation of finding minimum on list:
min(L, M) :- min(L, M, M).
min([], M, M).
min([Head|Tail], Acc, M) :- NewAcc is min(Acc, Head), min(Tail, NewAcc, M).
min([1,2,3,4,5,6], 1).
true.
min([1,2,3,4,5,6], 2).
false.
min([1,2,3,4,5,6], X).
is/2: Arguments are not sufficiently instantiated
I cant understand why this error happened. Could you explain it to me ?