This discussion has gone on long enough to convince me that there is not
sufficient consensus to override my strong belief that Fold is correctly
defined now. Since there is no chance that the system will be changed,
I think you should move this thread to Chat.
Henry Rich
On 2/25/2021 10:01 AM, 'Sergey Kamenev' via Programming wrote:
25.02.2021 16:17, Hauke Rehr:
Wrong again, the data will be the result of an operation,
the control array will be fixed on many occasions.
Control array to the left, data (whatever shape) to the right.
You can, of course, invent examples when the array for folding
will be filled with control elements,
but in practice it will most likely be data in its pure form.
For example, I need to get subtotals for +/ 1 2 3 4 5
without crazy computational costs for expression if we be using +/\ 1
2 3 4 5.
Fold is suitable for this:
0 ] F:. + 1 2 3 4 5
1 3 6 10 15
> Hauke Rehr:
> and the data argument may well be larger than the array
The same goes for the left argument:
in most cases it will be a single value,
and not an array more complex than an array to fold.
Sergey.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
This email has been checked for viruses by AVG.
https://www.avg.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm