diff --git a/src/lib/misc.c b/src/lib/misc.c index 64e177d..f061761 100644 --- a/src/lib/misc.c +++ b/src/lib/misc.c @@ -17,6 +17,11 @@ double multiply_cb(int a, int b) { return a * b; } double subtract_cb(int a, int b) { return a - b; } double sum_cb(int a, int b) { return a + b; } +double doMathematicalOperation(int a, int b, double (*op)(int, int)) +{ + return op(a, b); +} + int unlink_cb(const char *fpath, UNUSED const struct stat *sb, UNUSED int typeflag, UNUSED struct FTW *ftwbuf) { int rv = remove(fpath);