-
-
Save leobm/e92b02c6487652adccb8bc8442336be0 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