Parameter alias

what are the rules for using ‘parameter alias’ in a formula? the variables in angle brackets in some documentation example formulas. Specifically the rules for using multiple alias such as:

GROUP<product, index, category, products>(allProducts, product.category, { category: category, count: COUNT(products) })

the above code does not work if index is removed, but index is not part of the formula, so it must be some kind of placeholder and the variables are a sequence?

here is another example:

SELECT<product, position>(products, position < 2 && product.category == "Utility")

I think the following describes the parameter alias rules, any correction or further clarity would be appreciated. The appgyver formula function reference does describe some of the GROUP parameters.

Parameters are available in formula functions where the function traverses the list. Parameters have default variables (ie: item, key) and these variables may be aliased in the function by using <> brackets. The parameters follow a standard sequence when listing them as follows.

for: SELECT, GROUP, MAP
the current item
<item,index> the current item, the current item index

for: GROUP
<item,index,key,items> the current list item, the current list item’s index, the current identifier for the group, the current items in the key group

So the following three formulas produce the same results since the parameters are always available and only need to be aliased if its useful for your sanity:

GROUP<product, index, category, products>(allProducts, product.category, { category: category, count: COUNT(products) })
GROUP(allProducts, item.category, { category: key, count: COUNT(items) })
GROUP<item,index,group>(allProducts, item.category, { category: group, count: COUNT(items) })

The reference document for GROUP formula includes ‘index’ as a parameter but it is not assigned any role in the formula. I think, the second position of the alias list is dedicated to the ‘index’. It does not make sense that the following formula results leaves the index value blank:

GROUP<item, index, key, items>(allProducts, item.category, { index: index, key: key })

I would expect the following results so either its a bug or I don’t understand something:
[
{index:0, key:Utility},
{index:1, key:Tools}
]

if the item.category in the above example were a list, the following is a valid use of index, though I cant imagine the use for it:

GROUP<item, index, key, items>(allProducts, item.category[index], { key: key, items: items })

The parameter aliases now make sense to me. I hope this helps anyone else confused by them, since there is nowhere else that I have seen a description for the parameter alias in angle brackets