[ library(listut) | Reference Manual | Alphabetic Index ]

nth0(?I, ?List, -Elem)

Access nth element of a list
I
Integer position index, counting from 0
List
A list
Elem
Any term

Description

Succeeds when Elem is the Nth member of List, counting the first as element 0. (That is, throw away the first N elements and unify Elem with the next.)

Modes and Determinism

See Also

nth1 / 3, nth0 / 4, nth1 / 4