Z: can go in either u or v.
You are right, the stated equivalence is false. Fold does not pass the
first/last item of y through to the result, so as not to require the
result of u to be compatible with an item of y. You would need to add a
}. to make it right.
Ian has started a NuVoc page for Fold and it's already better than what
I wrote.
Henry Rich
On 8/31/2019 11:07 AM, Don Guinn wrote:
Just started looking at F:
Confused about where to put Z: . Does it go in u or in v? Do you have an
example showing the use of Z:?
In Requests#Fold_.28strawman.29 is the statement:
- u/\.&.|. y is equivalent to u F:. ] y
However, when I tried it I got a result as described earlier as
First Execution when x omitted
(1{y) u (0{y)
+F:.]i.10
1 3 6 10 15 21 28 36 45
+/\.&.|.i.10
0 1 3 6 10 15 21 28 36 45
0+F:.]i.10
0 1 3 6 10 15 21 28 36 45
----------------------------------------------------------------------
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