Created
November 20, 2021 00:00
-
-
Save zeroflag/1634116227c3b811f0692db4f2889634 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Object>>chain | |
^ ChainProxy new setTarget: self | |
ChainProxy>>doesNotUnderstand: aMessage | |
target := aMessage sendTo: target. | |
^ target | |
ChainProxy>>setTarget: anObject | |
target := anObject. | |
^ self | |
"Example" | |
#(apple peach banana) chain | |
groupedBy: #size; | |
select: [:each | each size even]; | |
values; | |
collect: #asCommaString. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment