from typing import Callable


def validate(validator: Callable) -> Callable:
    """A wrapper for Inquirer validator functions;
    ensures we pass the answer to the validator and not the entire answers list

    Args:
        validator (Callable): actual validator function

    Returns:
        Callable: actual validator functions with a modified signature
    """

    def fn(_: dict, answer: str) -> bool:
        return validator(answer)

    return fn