Fix builtin types methods

This commit is contained in:
Shunsuke Shibayama 2023-02-03 00:23:42 +09:00
parent c56ef64576
commit 8cdc735486
12 changed files with 180 additions and 7 deletions

View file

@ -19,3 +19,9 @@ def with__(obj, body):
def discard__(obj):
pass
def then__(x, f):
if x == None or x == NotImplemented:
return x
else:
return f(x)