Like Pascal Jasmin pointed out, fold is overkill for this example. For example:
(1 vec} A)-:vec fold A
1
But this does suggest a way of illustrating the use of a fold
conjunction, if that's what you want to focus on:
(A ]F..{{1 ( wrote:
>
> Dear J enthusiast,
>
> I try to play with fold fu
fold may not be the right approach
1 ( 3 2 $ 1 2 3 4 5 6)} 10 10 $ 0
On Saturday, April 23, 2022, 02:02:10 p.m. EDT, Pawel Jakubas
wrote:
Dear J enthusiast,
I try to play with fold functionality F...
and here solve more general cases, so when the accumulator structure is
different f
Dear J enthusiast,
I try to play with fold functionality F...
and here solve more general cases, so when the accumulator structure is
different from the list structure that is iterated.
To be concrete let's say we have the array, A, and a list of 2-elem
vectors, vec,
which institute coordinates (