First off, this is exciting! Probably the biggest change since dynamic arrays were introduced. I especially appreciate the 3 different icons for horizontal 1D, vertical 1D, and 2D arrays.
I'm curious about the terminology. Is a "List" different from an "Array"? For example:
Displayed as a "1×3 Array"
={{5,6,7}}
Displayed as a "List with 2 items"
={{9;10}}
Displayed as a "List with 1 items" [sic]
={{8}}
={{{5,6,7}}}
={{{9;10}}}
I'm not sure whether these are merely different orientations of the same underlying type, or distinct concepts.
More importantly, I'm struggling to understand the intended mental model. Should a List be thought of as:
A first-class container whose elements can themselves be arrays (container view)
or
A condensed dynamic array that is implicitly expanded when consumed by formulas (implicit-expansion view)?
Getting my head around the intended semantic model will make it easier to predict the behavior of Lists/Arrays (and answer the inevitable questions from my students when they see these new features).
The examples below this use myHList as an example (myVList is the same structure arranged vertically)
{"txt", 123, {5,6,7}, {9;10}, 123}
Several behaviors support the container view. Functions such as ROWS, COLUMNS, MAP, TAKE, DROP, TOROW, TOCOL, HSTACK, VSTACK, UNIQUE, and SORT appear to operate on the top-level elements of the List.
For example, the MAP function below suggests that nested arrays are preserved as elements rather than flattened.
=MAP(myHList,TYPE)
Returns {2,1,64,64,1}
However, other functions appear to operate recurvisely, exploding the nested arrays (the implicit-expansion view). For example:
=COUNTA(myHList)
Returns 8 rather 5
=ISNUMBER(myHList)
Spills {FALSE, TRUE, {TRUE,TRUE,TRUE}, {TRUE;TRUE}, TRUE}
=EXACT(myHList,myHList)
Spills {TRUE, TRUE, {TRUE,TRUE,TRUE}, {TRUE;TRUE}, TRUE}
These results suggest that the functions are evaluating the nested arrays element-by-element rather than evaluating each as its own element.
I'm most confused by the behavior of lookup functions. INDEX treats a nested array as its own distinct value, and UNIQUE can recognize duplicate occurrences of nested arrays (and it also distinguishes orientation). Yet, lookup functions don't seem able to find a List within a List.
=INDEX(myHList,3)
Spills {5,6,7}
=UNIQUE({{5,6,7},{5,6,7},{9;10},{9,10},"cat"},TRUE)
Spills {{5,6,7},{9;10},{9,10},"cat"}
It removes the duplicate {5,6,7} but keeps {9;10} and {9,10} separate.
=XMATCH(INDEX(myHList,3), myHList)
Spills {#N/A, #N/A, #N/A}
But, lookup functions also don't find individual values within the nested List (i.e., not the implicit-expansion view). The HAS function looks inside the arrays, but it too cannot find the array itself.
=HAS(myHList,5)
Returns TRUE
=XMATCH(5,myHList)
Returns `#N/A`
=HAS(myHList,{5,6,7})
Spills {TRUE, TRUE, TRUE}
=HAS(myHList,{{5,6,7}})
Returns {{TRUE, TRUE, TRUE}}
Is there guidance on which functions are expected to operate on top-level List elements versus recursively operating on the contents of array-valued elements?