mirror of
https://github.com/correl/typesafe-monads.git
synced 2024-11-14 11:09:36 +00:00
12 lines
295 B
Python
12 lines
295 B
Python
from __future__ import annotations
|
|
from typing import Any, Callable, Generic, TypeVar
|
|
|
|
T = TypeVar("T")
|
|
S = TypeVar("S")
|
|
|
|
|
|
class Functor(Generic[T]):
|
|
def map(self, function: Callable[[T], S]) -> Functor[S]: # pragma: no cover
|
|
raise NotImplementedError
|
|
|
|
__mul__ = __rmul__ = map
|