I'm experimenting with the Through
function. I suspect there is a way to use that function to obtain both the mean and difference of two values. But this doesn't work:
Through[{Mean, Subtract}[1175., 247.]]
It reports the error:
Mean::argx: Mean called with 2 arguments; 1 argument is expected.
The corollary raises a similar error:
Through[{Mean, Subtract}[{1175., 247.}]]
Subtract::argr: Subtract called with 1 argument; 2 arguments are expected.
I think the problem is caused by the Mean
function taking only one argument as a list of values, whereas Subtract
takes its arguments as two separate values. It reminds me of destructuring as found in other languages, hence the title. Feel free to edit that for something more descriptive.
Is there a way to do what I try? Since I'm learning the Wolfram Language, I would prefer a solution working in the general case rather that a solution specific to the Mean and Subtract functions.