Objective
Implement a function that walks a singly linked list and discards every node whose payload matches a reference value, freeing the removed nodes as it goes.
Steps
$ list_filter(&head, &target, eq) where eq returns 0 on match
every node whose data equals *target is unlinked and freed
$ list_filter(&head, &target, eq) with head == NULL
no-op, head stays NULL
Expected files
Allowed functions
Allowed headers

Objective
Implement a function that walks a singly linked list and discards every node whose payload matches a reference value, freeing the removed nodes as it goes.
Steps
$ list_filter(&head, &target, eq) where eq returns 0 on match
every node whose data equals *target is unlinked and freed
$ list_filter(&head, &target, eq) with head == NULL
no-op, head stays NULL
Expected files
Allowed functions
Allowed headers

Tests
Run the tests to grade your code