In coroutining mode, if Number1 or Number2 are free variables, the call to mod/3 is delayed until these variables are instantiated.
Success: mod(11, 2, 1). mod(-11, 2, Result). (gives Result = -1) Fail: mod(1, 2, 3). Error: mod(A, 2, 6). (Error 4). mod(6, 2.0, 3.0). (Error 5). mod(2, 0, Result). (Error 20). mod(4 + 2, 2, 12). (Error 24). mod(5, 2, r). (Error 24).