deleteTail :: [a] -> Int -> Int -> [a]
deleteTail lst n k | n == k = [(lst !! n)]
                   | otherwise = (lst !! k) : (deleteTail lst n (k + 1))
deleteTail lst n k | n == k = [(lst !! n)]
                   | otherwise = (lst !! k) : (deleteTail lst n (k + 1))