/* ************************************************ */
/* */
/* delete_nth1/3 */
/* Arg 1: Counter: integer */
/* Arg 2: List */
/* Arg 3: List */
/* Summary: calls delete_nth/4. */
/* Author: P J Hancox */
/* Date: 22 October 1994 */
/* */
/* ************************************************ */
delete_nth1(Pos, List1, List2) :-
delete_nth1(1, Pos, List1, List2).
/* ************************************************ */
/* */
/* delete_nth1/4 */
/* Arg 1: Counter: integer */
/* Arg 2: Position: integer */
/* Arg 3: List with element */
/* Arg 4: List without element */
/* Summary: true if Arg 3 is Arg 4 without Elem */
/* at Pos. */
/* Author: P J Hancox */
/* Date: 22 October 1994 */
/* */
/* ************************************************ */
% 1 terminating condition
delete_nth1(Pos, Pos, [Elem|Tail], Tail).
% 2 recursive
delete_nth1(Cnt, Pos, [Head|Tail1], [Head|Tail2]) :-
Cnt1 is Cnt + 1,
delete_nth1(Cnt1, Pos, Tail1, Tail2).
|