From 6df10750baf8bf1d08ae823406935cd8d67e73a0 Mon Sep 17 00:00:00 2001 From: Kapliuk Date: Wed, 13 Mar 2024 21:00:19 +0000 Subject: [PATCH] =?UTF-8?q?=D0=92=D0=B8=D0=B4=D0=B0=D0=BB=D0=B8=D1=82?= =?UTF-8?q?=D0=B8=20'cv4/.meta/example.h'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cv4/.meta/example.h | 47 --------------------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 cv4/.meta/example.h diff --git a/cv4/.meta/example.h b/cv4/.meta/example.h deleted file mode 100644 index 14a56d8..0000000 --- a/cv4/.meta/example.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef LIST_OPS_H -#define LIST_OPS_H - -#include -#include - -typedef int list_element_t; - -typedef struct { - size_t length; - list_element_t elements[]; -} list_t; - -// constructs a new list -list_t *new_list(size_t length, list_element_t elements[]); - -// append entries to a list and return the new list -list_t *append_list(list_t *list1, list_t *list2); - -// filter list returning only values that satisfy the filter function -list_t *filter_list(list_t *list, bool (*filter)(list_element_t)); - -// returns the length of the list -size_t length_list(list_t *list); - -// return a list of elements whose values equal the list value transformed by -// the mapping function -list_t *map_list(list_t *list, list_element_t (*map)(list_element_t)); - -// folds (reduces) the given list from the left with a function -list_element_t foldl_list(list_t *list, list_element_t initial, - list_element_t (*foldl)(list_element_t, - list_element_t)); - -// folds (reduces) the given list from the right with a function -list_element_t foldr_list(list_t *list, list_element_t initial, - list_element_t (*foldr)(list_element_t, - list_element_t)); - -// reverse the elements of the list -list_t *reverse_list(list_t *list); - -// destroy the entire list -// list will be a dangling pointer after calling this method on it -void delete_list(list_t *list); - -#endif