findFarthestPoints :: [Point] -> Int -> Double -> Double -> Double -> Range -> Int -> Int -> Point -> (Range, Point, Bool)
findFarthestPoints srcContours iters dist max_dist epsi right_slice count pos start_pt
        | iters == 0 = (right_slice, start_pt, (max_dist <= epsi))
        | otherwise  = findFarthestPoints srcContours (iters - 1) dist (fst nestedFunc) epsi (snd nestedFunc) count cntPos (readPt srcContours cntPos)
        where
                cntPos     = cntPosFunc pos right_slice count
                nestedFunc = findFarthestPointsSecond srcContours count 1 (readPt srcContours 1) max_dist start_pt right_slice
findFarthestPoints :: [Point] -> Int -> Double -> Double -> Double -> Range -> Int -> Int -> Point -> (Range, Point, Bool)
findFarthestPoints srcContours iters dist max_dist epsi right_slice count pos start_pt
        | iters == 0 = (right_slice, start_pt, (max_dist <= epsi))
        | otherwise  = findFarthestPoints srcContours (iters - 1) dist (fst nestedFunc) epsi (snd nestedFunc) count cntPos (readPt srcContours cntPos)
        where
                cntPos     = cntPosFunc pos right_slice count
                nestedFunc = findFarthestPointsSecond srcContours count 1 (readPt srcContours 1) max_dist start_pt right_slice
findFarthestPoints srcContours iters dist max_dist epsi right_slice count pos start_pt
        | iters == 0 = (right_slice, start_pt, (max_dist <= epsi))
        | otherwise  = findFarthestPoints srcContours (iters - 1) dist (fst nestedFunc) epsi (snd nestedFunc) count cntPos (readPt srcContours cntPos)
        where
                cntPos     = cntPosFunc pos right_slice count
                nestedFunc = findFarthestPointsSecond srcContours count 1 (readPt srcContours 1) max_dist start_pt right_slice