mirror of
https://github.com/correl/typesafe-monads.git
synced 2025-03-14 09:16:30 -09:00
Add a __repr__ method to Future
This commit is contained in:
parent
7745f5ff6a
commit
6f9ce55404
1 changed files with 3 additions and 0 deletions
|
@ -60,6 +60,9 @@ class Future(Monad[T]):
|
|||
def __await__(self):
|
||||
return self.awaitable.__await__()
|
||||
|
||||
def __repr__(self):
|
||||
return f"<Future {self.awaitable}>"
|
||||
|
||||
__rshift__ = bind
|
||||
__and__ = lambda other, self: Future.apply(self, other)
|
||||
__mul__ = __rmul__ = map
|
||||
|
|
Loading…
Add table
Reference in a new issue