from typing import List


def generate_doc_for_functions(names: List[str]) -> str:
    """Generate documentation for a list of functions."""
    ans = ""
    for n in names:
        ans += n
        ans += "\n"
        ans += "-" * len(n)
        ans += "\n\n"
        ans += f".. autofunction:: {n}\n\n"
    return ans