from typing import Callable


def func_from_line(a: tuple, b: tuple) -> Callable[[int], int]:
    """
    Return a line function from two points
    """
    def f(x):
        """ the line function y = f(x)"""
        return a[1] + (b[1]-a[1])/(b[0]-a[0])*x - (b[1]-a[1])/(b[0]-a[0])*a[0]
    return f