From 17c58eb90c7c104c7f9dde16e1e82b2cc1afdf5e Mon Sep 17 00:00:00 2001 From: Hammy Date: Fri, 31 Dec 2021 09:31:07 +0000 Subject: [PATCH] Add List_delete() definition --- src/list.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/list.h b/src/list.h index 3886e25..dd94bd4 100644 --- a/src/list.h +++ b/src/list.h @@ -111,6 +111,23 @@ int List_insert(List *list, int index, int element); */ int List_remove(List *list, int element); +/* + * + * Description + * ---------------------------- + * Delete the element at the given index of the given list + * + * Params + * ---------------------------- + * *list the list to remove the element at given index + * index the index to delete within the given list + * + * Returns + * ---------------------------- + * int (The deleted element) + */ +int List_delete(List *list, int index); + /* * * Description