On 7/11/07, Edward A. Romana <erom at earthlink.net> wrote:
>
> Add to the list documentation introduction:
>
> list of lists can be addressed as follows
>
> (%i1) my_list:[[1,2],[3,4]]$
>
> (%i2) my_list[2][1]
> (%o2) 3
>
I think the point to be made here in *reference* (as opposed to tutorial)
documentation is that xxx[i][j] is equivalent to (xxx[i])[j]. Similarly for
f(x)[i], etc. In general, composition works straightforwardly with left
association, e.g.
[q,r,s] => [q,r,s]
[q,r,s][2] => r
rest([q,r,s])[2] => s
[[1,2],[2,3]][2] => [2,3]
rest([[1,2],[2,3]])[1] => [2,3]
lambda([a],[a,a^2,a^3])(q)[2] => q^2
f[2]: lambda([x],x^3)$
f[2](3) => 27
etc. There is nothing special about x[i][j].