The One: reuse the same instance instead of creating a new one at every bind.
This commit is contained in:
@@ -9,8 +9,8 @@ class TFTheOne:
|
|||||||
self._value = v
|
self._value = v
|
||||||
|
|
||||||
def bind(self, func):
|
def bind(self, func):
|
||||||
result = func(self._value)
|
self._value = func(self._value)
|
||||||
return TFTheOne(result)
|
return self
|
||||||
|
|
||||||
def printme(self):
|
def printme(self):
|
||||||
print self._value,
|
print self._value,
|
||||||
|
|||||||
Reference in New Issue
Block a user