--- a/ReindexedCollection.st Fri Oct 14 00:15:23 2016 +0200
+++ b/ReindexedCollection.st Fri Oct 14 00:28:38 2016 +0200
@@ -40,17 +40,26 @@
"
ReindexedCollection is a wrapper around a sequenceable collection that remaps the indices
with in linear algorithm.
- The elements in the ReindexedCollection are elements in the sequenceable collection at
- some start to some stop at some step.
+ The elements in the ReindexedCollection are the elements of the original collection
+ at 'some start' to 'some stop' (optionally 'by some step').
ReindexedCollection allows for efficient use of first/rest-like algorithms (i.e. aka Lisp)
applied to Sequenceable collections, as they avoid element-copying.
+ For example,
+ coll1 := #(1 2 3 4 5 6 7 8 9 10).
+ coll2 := coll1 from:8.
+ gives us a collection in coll2, which 'contains' 3 elements, 8, 9, 10
+ with indices 1,2,3.
+ I.e. a slice from the other array.
+
+ The reindexed collection is 'read-only'. I.e. it does not allow for elements to be changed.
+
See class side examples.
[Instance Variables:]
- sequence <SequenceableCollection> the sequence that will be reindexed.
- interval <Interval> the object that describes indicies of interest in the sequence.
+ sequence <SequenceableCollection> the sequence that will be reindexed.
+ interval <Interval> the object that describes indicies of interest in the sequence.
[Origin:]
Part of the Engineering Math Goodies package from Travis.