nth1/6¶
nth1(? N, ? List, ? Elem, ? Rest)*
Unifies Elem with the Nth element of List, counting from 1, and Rest with the other elements.
This procedure can be used to select the Nth element of List (yielding Elem and Rest), or to insert Elem before the Nth (counting from 1) element of Rest, when it yields List, e.g ```
7nth1(3, List, c, [a,b,d,e]) ```
results in _List_ = [a,b,c,d,e]
.