Created
February 12, 2015 23:44
-
-
Save knzai/eca0966bb3b13e7417e2 to your computer and use it in GitHub Desktop.
returning self means mutation
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
# If you return self you have either mutated self, mutated something else (essentially global, even worse) | |
# or thrown away the change as a NOOP. Let's play with examples? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Come up with an example of a function that is not a NOOP and returns self.