made popping with lists work. yay! (also new demo to show the thing)

This commit is contained in:
Odweta
2023-12-22 14:27:07 +01:00
parent ea527405e5
commit 45732c4b22
5 changed files with 47 additions and 14 deletions
+6 -4
View File
@@ -17,10 +17,12 @@ typedef struct {
vector_t* data; // vector of vectors
} list_t;
list_t* listInit(); // returns a new list
list_t* listInit(); // returns a new list
void listPush(list_t* l, dataType_e type, void* element); // appends an element at the end of a list
void listPush(list_t* l, dataType_e type, void* element); // appends an element at the end of a list
void listPrint(list_t* l); // prints a list
void listPrint(list_t* l); // prints a list
void listCleanup(list_t* l); // freeing pointers
void listCleanup(list_t* l); // freeing pointers
void* listPop(list_t* l); // popping the last value of the list and returning it