@GreenSaguaro Some people strongly prefer thinking in 0-origin, and for some problem domains, expressions become simpler using it. See also apl.wiki/Index_origin
I have a huge vector on the right, but {⍺,⍺} ignores the right argument entirely, and just catenates the left argument with itself, returning a 2-item vector.
The reason I am toying with this is because I have an array in which I need to add elements to it by working with it X number of times. It will start with two elements, and the elements added to it will be a calculation based on previous elements. The initial idea I had was to have an array like this: (⊂1 2), ⍳9, then I would do a fold only using ⍺ to extract values from and append to the first nested array, using it as an accumulator. Basically doing an unfold type of operation.
But this did not work obviously, demonstrated by my previous {⍺,⍺} confusion.
What would be the "correct" strategy to grow an array by appending in which the appended elements are based on previous values, and to do this N times?
it is unintuitive to new comers of APL from FP communities like Haskell, but the fold in apl is from right to left by default, to get the desired the similar fold from Haskell you need to reverse it.
And what you intended to do would probably be ⋄ {⍺,⊃⍺}{↑⍺⍺⍨/(⌽⍵)}⍳9