I just could not get how the typedef function pointers are passed to the "uniqueOrderedListCreate" function below, what I know is when we declare a typedef of a function pointer we need to add a parameter when passing as an argument for example:
UniqueOrderedList uniqueOrderedListCreate(copyElements a, freeElements b,
elementsEquals c, elementGreaterThan d);
Is there something that I misunderstand here?
#ifndef UNIQUEORDEREDLIST_H_
#define UNIQUEORDEREDLIST_H_
#include <stdbool.h>
typedef struct uniqueOrderedList_t* UniqueOrderedList;
typedef void* Element;
typedef Element (*copyElements)(Element);
typedef void (*freeElements)(Element);
typedef bool (*elementsEquals)(Element, Element);
typedef bool (*elementGreaterThan)(Element e1, Element e2);
UniqueOrderedList uniqueOrderedListCreate(copyElements, freeElements,
elementsEquals, elementGreaterThan);