Your task is to implement a function able to filter out the elements of a circular linked list based on a given predicate function.
For this exercise, use the following data structures :
typedef struct node { struct node* next; int value; } node_t; typedef struct circular_linked_list{ struct node* tail; int size; } list_t;
For instance, here's how the function should behave with the following lists :
Note : when the tail of the initial list is not kept, the tail of the returned list must be the closest node to the left that has been accepted by the predicate. In the example above, if the node "e" had not been accepted into the returned list, then the new tail would have been the node "c".