RM> 1) break the arguments into cells
RM> 2) apply verb to the relevant cells
RM> 3) assemble the result into a an array, padding if necessary
RM> The length error, here, happens at "step" 2.
I suggest to expand this list a bit. For the dyadic case here (x ,. y):
1a) break the left and right arguments into left and right cells
(according to the verb rank)
1b) establish the pairings between left and right cells
(according to DoJ II.b, "first pair along the common frame,
then distribute one-to-many")
2) apply verb to each cell pair
3) assemble the result into an array, padding if necessary.
In 1 2 3 + 1 2, this fails at during 1b with a length error.
In 1 2 3 ,. 1 2, there's a single cell on either side, and hence
step 1b won't raise a lenght error, BUT...
Like Raul wrote: The length error is raised during 2. It is a complaint
due to the inner whims of Stitch.
I sympathize with David: One could argue that automatic length padding
would be a nice feature. Append (,) has different fish to fry while
assimilating arguments, so I would rather compare Stitch (,.) and
Laminate (,:):
1 2 3 ,. i.10
|length error
| 1 2 3 ,.i.10
1 2 3 ,: i.10
1 2 3 0 0 0 0 0 0 0
0 1 2 3 4 5 6 7 8 9
To me, this treatment is not at par and thus a small irregularity in the
language.
Martin
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm