I have two C functions f1
and f2
that take the same arguments. Based on a condition, I need to invoke one or the other one with the same arguments:
if (condition) {
result = f1(a, b, c);
} else {
result = f2(a, b, c);
}
I understand it is possible to use the syntax:
result = condition ? f1(a, b, c) : f2(a, b, c)
Is it be possible to have a DRY syntax that requires to write arguments a single time?