Remove old Monad definition from monads.result

This commit is contained in:
Correl Roush 2018-10-12 14:25:19 -04:00
parent e21791a8b7
commit 68705f25cc

View file

@ -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