I would consider this: a = (1..9); ((0..6) +.t (0..2)).collect(a[_]); ((0, 2 .. 6) +.t (0..2)).collect(a[_]); See the Adverbs helpfile. Also I use the property of Array:at that if you pass in an array of indices, you get an array with the values at each corresponding index of the source array, e.g., a[[0, 5]] == [1, 6] hjh On Oct 24, 2007, at 7:45 AM, Stefan Kersten wrote:
: H. James Harkins : jamshark70@xxxxxxxxxxxxxxxxx : http://www.dewdrop-world.net .::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..: "Come said the Muse, Sing me a song no poet has yet chanted, Sing me the universal." -- Whitman |