findFarthestPointToLine (currntPoint : pointList) line finalPoint dist
    | newDist >= dist = findFarthestPointToLine pointList line currntPoint newDist
    | otherwise      = findFarthestPointToLine pointList line finalPoint dist
    where
        newDist = pointToLineDist (line !! 0) (line !! 1) currntPoint
findFarthestPointToLine (currntPoint : pointList) line finalPoint dist
    | newDist >= dist = findFarthestPointToLine pointList line currntPoint newDist
    | otherwise      = findFarthestPointToLine pointList line finalPoint dist
    where
        newDist = pointToLineDist (line !! 0) (line !! 1) currntPoint
findFarthestPointToLine (currntPoint : pointList) line finalPoint dist
    | newDist >= dist = findFarthestPointToLine pointList line currntPoint newDist
    | otherwise      = findFarthestPointToLine pointList line finalPoint dist
    where
        newDist = pointToLineDist (line !! 0) (line !! 1) currntPoint