[Pkg] The Trunk: Collections-cmm.785.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Mar 30 22:57:57 UTC 2018
Chris Muller uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-cmm.785.mcz
==================== Summary ====================
Name: Collections-cmm.785
Author: cmm
Time: 30 March 2018, 5:57:37.727038 pm
UUID: 37e9870a-5379-4185-8538-fada710dad5d
Ancestors: Collections-eem.784
Add #at:ifPresent:ifAbsent: for API compatibility with other kinds of directly-accessible Collections.
=============== Diff against Collections-eem.784 ===============
Item was added:
+ ----- Method: SequenceableCollection>>at:ifPresent:ifAbsent: (in category 'accessing') -----
+ at: index ifPresent: elementBlock ifAbsent: exceptionBlock
+ "Answer the value of elementBlock on the element at position index. If I do not contain an element at index, answer the result of evaluating exceptionBlock."
+ ^ elementBlock value:
+ (self
+ at: index
+ ifAbsent: [ ^ exceptionBlock value ])!
More information about the Packages
mailing list