mirror of
https://github.com/correl/typesafe-monads.git
synced 2024-11-14 11:09:36 +00:00
Remove old Monad definition from monads.result
This commit is contained in:
parent
e21791a8b7
commit
68705f25cc
1 changed files with 2 additions and 9 deletions
|
@ -1,20 +1,13 @@
|
|||
from __future__ import annotations
|
||||
from typing import Any, Callable, Generic, TypeVar
|
||||
|
||||
from .monad import Monad
|
||||
|
||||
T = TypeVar("T")
|
||||
S = TypeVar("S")
|
||||
E = TypeVar("E")
|
||||
|
||||
|
||||
class Monad(Generic[T]):
|
||||
@classmethod
|
||||
def pure(cls, value: T) -> Monad[T]:
|
||||
raise NotImplementedError
|
||||
|
||||
def bind(self, function: Callable[[T], Any]) -> Monad[S]:
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
class Result(Monad[T], Generic[T, E]):
|
||||
def __init__(self) -> None: # pragma: no cover
|
||||
raise NotImplementedError
|
||||
|
|
Loading…
Reference in a new issue