示例#1
0
 def get_or_raise(self) -> Task[R]:
     return Task(self.__async_get_or_raise())
示例#2
0
 def to_task(self) -> Task[Either[L, R]]:
     return Task(self.__value)
示例#3
0
 def get_or_call(self, fn: Callable[[L], R]) -> Task[R]:
     return Task(self.__async_get_or_call(fn))
示例#4
0
 def get_or(self, value: R) -> Task[R]:
     return Task(self.__async_get_or(value))
示例#5
0
 def match(self, on_left: Callable[[L], T],
           on_right: Callable[[R], T]) -> Task[T]:
     return Task(self.__async_match(on_left, on_right))
示例#6
0
 def to_maybe(self) -> Task[Maybe[T]]:
     return Task(self.__value)
示例#7
0
 def get_or_call(self, fn: Callable[[], T]) -> Task[T]:
     return Task(self.__async_get_or_call(fn))