Created
April 17, 2020 20:41
-
-
Save wiccy46/cb0fde8af2b8996823671a4caca6a73a to your computer and use it in GitHub Desktop.
[chainadd] Chain add function #python #math
This file contains 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
class CustomInt(int): | |
def __call__(self, v): | |
return CustomInt(self + v) | |
def add(v): | |
return CustomInt(v) | |
# add(3)(4)(5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment