static any_t mapper(any_t elem)
{
return ("replaced");
}
static bool filter(any_t elem)
{
char *casted = (char *) elem;
return (strcmp(casted, "replaced"));
}
int main()
{
array_t array;
array = array_new(NULL, NULL);
array->add(array, "hello");
array->add(array, "this is");
array->add(array, "an array");
array->map(array, &mapper)->filter(array, &filter);
assert(array->length == 0);
}
-
Notifications
You must be signed in to change notification settings - Fork 0
Romain-P/Funny-C
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
yolo experiences in C
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published