I’m having trouble understanding the reasoning/logic of the syntax/usage of the ‘any’ and ‘index’ features in relation to using Stores as presented in the Examples section. I think that some additional clarification or explanation would be helpful.
The use of “1” after the ‘store’ referenced by ‘index’ is where I get confused/lost:
+ any(lowercase) > index(uppercase, 1) c translate vowels to upper case
Why is this needed in this instance? What is its purpose? And what would be the result of changing the “1” to a “3” or other number?
The preceding text leads me to think that this example would transform any lowercase vowel to the first uppercase vowel in the store; and if the “1” were a “3” then any lowercase vowel would be transformed into the third uppercase vowel in the store.
So, how and why does “1” change any lowercase vowel to the uppercase vowel with the same corresponding index?
The logic I am familiar with from other languages would assume that NO specified index number refers to the corresponding (same) index number, and that specifying a number changes “any” of the first store’s contents into the item stored at that index number of the second named store. I think this is very sound and reasonable logic and that any deviation from this pattern deserves an explanation!
I would propose an Edit to the page myself, but I can’t make sense of it!
Thank you in advance to whomever renders me some assistance! I will be very grateful!