Juerd wrote:

Jonathan Lang skribis 2004-09-07 14:12 (-0700):


if we want to look at the next existing element, we can say (1 +
1).th; if we want to look at the element whose index is one higher
than the first index, we can say 1.st + 1.



I read this three times, but don't get it. Can you please explain what the difference is between the element after the 1st and the element whoso index is one higher than the 1st's?

I think (correct me) what he's getting at here is a sparse array 1=>a, 3=>b, 4=>c where 2nd is 'b' (the second item) but 1st+1 is undefined (there is no index 2). I don't know how well that scheme works from a comprehension point of view though, it seems a little confusing.
-Michael

Reply via email to