u1(u2(u3(u4(y)))) was the mathematical description of the strawman algorithm.
We are still in a discussion about tacit J. The expression you are opposing is
this one:
"As far as I can understand the pattern of the strawman, [: u1 [:u2 [:
u3 [: u4 ] , is the only expression in tacit J with the meaning of 4
monadic verbs ux in sequence. All other similar expressions have a more
complex meaning. Correct me if I'm wrong."
Bob Thierrault says:
I believe it could also be expressed as
u1 @: u2 @: u3 @: u4 @: ]"_
Cheers, bob
You say he is right:
"Yes, and the @:]"_ is redundant for any and all verbs u1 u2 u3 and u4.
And ([: u1 [:u2 u3@:u4) is another example equivalent..."
I think I proved you both wrong with this:
There is a considerable difference in memory allocation indicating
differences between these expressions. If the first version creates
three copies, the second seems to create five.
ts'([: - [: - [: - [: - ])i. 100000000'
1.45991 3.22123e9
ts'(- @: - @: - @: - )i. 100000000'
1.48942 5.36871e9
And this:
Its is some redundant calls to the @: conjunction that makes the difference?
ts'(- @: - @: - @: - )i. 100000000'
1.56681 5.36871e9
c=: 2 :(':';'[: u v')
ts'(- c - c - c - )i. 100000000'
1.56479 5.36871e9
It is unclear which tacit J expression you mean by u1(u2(u3(u4(y)))).
/Erling
On 2016-08-05 22:22, Raul Miller wrote:
If you want the algorithm of u1(u2(u3(u4(y)))) and not any expression
with the same result, then you should be using u1(u2(u3(u4(y)))) and
not some other expression.
That said, you might want to wrap it in verb def '' (with the
expression going inside the quotes) so that you can have a verb
definition.
Thanks,
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm