Thanks for the reply, I am sorry as the question I framed was really not clear. Let me be a bit detailed:
I want to write a function in prolog for the if-else statement.
if-instantiated( X,X) else if-instantiated (Y,Y) else if-instantiated( X\\^Y, concat(X,Y):- If the attribute X is instantiated( holds some value) then write X, else if the attribute Y holds some value then write Y, else if both the attributes X and Y hold some values, then append X and Y and write them.
I know how to write the concat function. But I am unaware of writing the function for the above if-else rule. please help me.
Thanks in advance,