4 ms·
A hallmark example of point-free style in J is likely the example of calculating the average value of the array: +/ % # Here literally you say "I'm calculatin
by avmich 9y ago
A hallmark example of point-free style in J is likely the example of calculating the average value of the array:
+/ % #
Here literally you say "I'm calculating sum of elements (+/) which then divide (%) into the number of elements (#)".
If your array isn't just a one variable (x) but instead is obtained as a result of an expression, you may not want to repeat that expression twice or to invent an intermediate variable to store the array result. Here point-free style can help.