Select/insert element at index. True when Elem is the N’th
(0-based) element of List and Rest is the
remainder (as in by
select/3) of List.
For example:
?- nth0(I, [a,b,c], E, R).
I = 0, E = a, R = [b, c] ;
I = 1, E = b, R = [a, c] ;
I = 2, E = c, R = [a, b] ;
false.