Documentation Prolog Predicate Reference lists nth0/3

nth0/3

Get the Nth element of a list.

Description

nth0( ?integer, ?list, ?term )

nth0(Index, List, Item) is true if and only if Item is the element of List on the Index-th position. nth0 starts the index count at 0.

Implementation