Its been over a decade sinxe i used Prolog but it seems to me that + (A,B) fails for uninstantiated A and B b/c Prolog isnt lazy so it cannot generate an infinite stream of pairs of numbers that arent equal. Which is what you'd need to move onto the next literal
Its been over a decade sinxe i used Prolog but it seems to me that + (A,B) fails for uninstantiated A and B b/c Prolog isnt lazy so it cannot generate an infinite stream of pairs of numbers that arent equal. Which is what you'd need to move onto the next literal