I\'m trying to write a predicate to find the nth element of a list.
Initially I wrote something like this:
nth([X|_], 0, X). nth([_|T],N,Z):- N > 0,