def point_distance_wrapper(line:list):
    """
    wrapper function to return a function that finds the distance between point and the line
    :param line: line to be compared to (gradient, y_intercept)
    :return: function that takes in a point and finds the distance from the input point to the line
    """
    def point_distance(point:list):
        # calculates horizontal distance of point from line
        return abs(point[0] - (point[1] - line[1]) / line[0])
    return point_distance