31: #line 49 "felix_stdcat.ipk" 32: class int_add(cat_monoid): 33: def __init__(self, modulus=0): 34: cat_monoid.__init__(self,0) 35: self.modulus = abs(modulus) 36: 37: def compose(self, left, right): 38: sum = long(left) + long(right) 39: if self.modulus: return sum % self.modulus 40: else: return sum 41: 42: def is_arrow(self, object): 43: try: 44: as_long = long(object) 45: return 1 46: except: return 0 47: 48: def inverse(self, object): 49: if self.modulus: return self.modulus - object 50: else: return - object 51: