Remembering LISP

Consider a matrix:

<array>
<row><cell>A1</cell><cell>A2</cell>...<cell>An</cell></row>
<row><cell>B1</cell><cell>B2</cell>...<cell>Bn</cell></row>
...
<row><cell>X1</cell><cell>X2</cell>...<cell>Xn</cell></row>
</array>

XQuery is fine for removal redundant rows and columns, for some sorting, data normalization etc.
But a) how to transpose the matrix? and b) how to return a main-diagonal vector A1 B2 C3 ... Xn?

I think that Core Function Library should include at least all basic LISP functions, including
mapcar-like functions and apply. (I think it's redundant to suggest list, nth, last, sublist and
append).
In any LISP, I can transpose the matrix by expression (apply 'mapcar 'list my_matrix).
It should be easy to do the same in XQuery.

Thanks,
Iv An.

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Received on Thursday, 17 May 2001 03:34:54 UTC