Append , says:
x,y appends items of y to items of x after:
- Reshaping an atomic argument to the shape of the items of the other,
- Bringing the arguments to a common rank (of at least 1) by repeatedly itemizing (,:) any of lower rank, and
- Bringing them to a common shape by padding with fill elements in the manner described in Section II B.
What is meant by 1.? Doesn't step 2. and 3. do this? Could 1. be removed from the list and the result would still be the same (I assume it cannot but like to understand why)?
- Reshaping an atomic argument to the shape of the items of the other,
This step will repeat an argument, if it is atomic, which is different from "padding with fill elements" (of step 3.). Compare the scalar 5 with the list 1$5 (i.e. a list of one element):
NB. scalar 5, atomic case (step 1. applies), argument is repeated
(i. 2 3), 5
0 1 2
3 4 5
5 5 5
NB. list 1$5, non-atomic case (step 2. and 3. apply), argument is padded
(i. 2 3), 1$5
0 1 2
3 4 5
5 0 0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With