[squeak-dev] The Trunk: Collections-ct.958.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Dec 9 13:07:36 UTC 2021
Marcel Taeumel uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-ct.958.mcz
==================== Summary ====================
Name: Collections-ct.958
Author: ct
Time: 7 September 2021, 1:40:24.881692 pm
UUID: d74eebaf-9b60-4345-9b59-9078d993dfcd
Ancestors: Collections-ct.956
Adds Dictionary >> #withKeysSorted: and Dictionary >> #withKeysSortedSafely. Requires Collections-ct.957.
=============== Diff against Collections-ct.956 ===============
Item was added:
+ ----- Method: Dictionary>>withKeysSorted: (in category 'sorting') -----
+ withKeysSorted: aSortBlockOrNil
+
+ | sorted |
+ sorted := OrderedDictionary new: self size.
+ (self keys sorted: aSortBlockOrNil) do: [:key |
+ sorted at: key put: (self at: key)].
+ ^ sorted!
Item was added:
+ ----- Method: Dictionary>>withKeysSortedSafely (in category 'sorting') -----
+ withKeysSortedSafely
+
+ | sorted |
+ sorted := OrderedDictionary new: self size.
+ self keysSortedSafely do: [:key | sorted at: key put: (self at: key)].
+ ^ sorted!
More information about the Squeak-dev
mailing list
|