from typing import Callable, Tuple type_F = Callable[[int], int] def factory(total: int) -> Tuple[type_F, type_F]: def adder(k): return k + total def subtractor(k): return total - k return adder, subtractor if __name__ == "__main__": add, min = factory(5) print(add(1)) print(min(3))