Logiweb(TM)

7.3.3 Zeroth, first, second, etc.

Prev Up Next Page 178 of 800 Search internet


The ten first elements of a tuple may be extracted using the following constructs

x zeroth [x zeroth]

x first [x first]

x second [x second]

x third [x third]

x fourth [x fourth]

x fifth [x fifth]

x sixth [x sixth]

x seventh [x seventh]

x eighth [x eighth]

x ninth [x ninth]

As an example of use, we have:

<< 3 ,, 4 ,, 5 ,, 6 ,, 7 >> third == 6

Note that elements are counted starting with zero. That is useful sometimes but also has been the source of quite a number of bugs over time.

Prev Up Next Page 178 of 800 Search logiweb.eu

Copyright © 2010 Klaus Grue, GRD-2010-01-05