From a47c903770ace3e056dc6a56f87371635ae9f27b Mon Sep 17 00:00:00 2001 From: Gabriel Omar Cotelli Date: Wed, 9 Aug 2023 14:36:06 -0300 Subject: [PATCH] Add method to compatibility package --- source/Buoy-GS64-Compatibility/Collection.extension.st | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 source/Buoy-GS64-Compatibility/Collection.extension.st diff --git a/source/Buoy-GS64-Compatibility/Collection.extension.st b/source/Buoy-GS64-Compatibility/Collection.extension.st new file mode 100644 index 0000000..6d9e0a1 --- /dev/null +++ b/source/Buoy-GS64-Compatibility/Collection.extension.st @@ -0,0 +1,10 @@ +Extension { #name : #Collection } + +{ #category : #'*Buoy-GS64-Compatibility' } +Collection >> any [ + + "Answer a representative sample of the receiver. It raises an error when the collection is empty. This method can be helpful when needing to preinfer the nature of the contents of semi-homogeneous collections." + + self emptyCheck. + self do: [ :each | ^ each ] +]