Prolog infix operator definition
问题 I am recently learning about Prolog and I find the three types used for defining infix operators confusing. What are the differences between xfx, xfy and yfx when specifying the type of an operator? I have googled about the problem and haven't found anything useful. I tried typing the following codes in Prolog: :- op(500,yfx,is_alive). is_alive(A,B) :- display([A,B]). :- op(500,xfy,is_alive2). is_alive2(A,B) :- display([A,B]). :- op(500,xfx,is_alive3). is_alive3(A,B) :- display([A,B]). and