Add Nat class

This commit is contained in:
Shunsuke Shibayama 2022-10-16 21:11:16 +09:00
parent 2b9e214ac6
commit a565206330
6 changed files with 94 additions and 39 deletions

View file

@ -16,6 +16,11 @@ def in_operator(x, y):
else:
return x in y
class Nat(int):
def times(self, f):
for _ in range(self):
f()
class Range:
def __init__(self, start, end):
self.start = start