we should also have an applyFunctionToBinary