Why am I getting Arguments are not sufficiently instantiated for argument A?
===

Here is my code:

        getMin([Y|List1],X):-
        getMin(List, Y, X).
    getMin([A|List],B,X):-
            A=<B,
            getMin(List,A,X);
            B=<A,
            getMin(List,B,X).
    getMin([],X,X).

When entering getMin/3 A is supposed to be 1 as I understand, but at A=< B I get "Arguments are not sufficiently instantiated" error. Why and how to fix it?
<p>I also found [this][1] but since I'm very new to Prolog, I don't realize where exactly they got the error there and why the argument where not instantiated there. (There are lot's of other similar posts but it is hard to make the connection between other a bit different programs and yours.)  


  [1]: http://stackoverflow.com/questions/9780067/simple-prolog-program-getting-error-2-arguments-are-not-sufficiently-instan