If I type in SWI Prolog a "nth0" query, the result is:
?- nth0(N,X,a).
N = 0,
X = [a|_G282] ;
N = 1,
X = [_G281, a|_G285] ;
N = 2,
X = [_G281, _G284, a|_G288] ;
... etc
however, the SWI manual says:
Errors
type_error(integer, Index) if Index is not an integer or unbound.
so, if my understanding of this text is correct (?), it seems that an error should be triggered instead of the previous results.
In addition, I wonder which one of the behaviours is the correct one taken into account the ISO standard.
(I known stack-overflow doesn't allows questions for references, so, I will not ask for a link to standard, but I hope do not break the rules if I ask: is ISO standard publicly available? if not, there are any equivalent RFC? ).