On Sat, 30 Mar 2019 at 01:09, Peter Kenny <peter@pbkresearch.co.uk> wrote:
Tim
Going back to your original question, the answer is there all the time but buried in the enormous method dictionaries of the Collection subclasses.
And we have Tools > Finder > Examples > #(10 20 30 40) . 5 . 10 to help unbury such methods...
If you look at SequenceableCollection>>atWrap: you will see that it does exactly what you want.
To get the item before the first, i.e. the zeroth: #(1 2 3 4) atWrap: 0 => 4
To get the item after the last: #(1 2 3 4) atWrap: 5 => 1
As seen here, the method is inherited by Array, so it should do all you want.
HTH
Peter
---------------
Marcus Denker-4 wrote
On 29 Mar 2019, at 14:24, Ben Coman < I believe there have been some proposals to separate out the Process related LinkedList stuff, but I can't remember the exact arguments.
Yes, we did that⦠there is now ProcessList.
We ran into that problem far too often âhey, LinkedList can be cleaned up easily like this!â â> boom, everything broken.
Now we have ProcessList where it matters if code is changed to introduce a message send more and LinkedList where it does not.
Cool !! cheers -ben