from typing import Callable
from typing import Any
from typing import List


def str2list(parser: Callable[[str], Any]) -> Callable[[str], List[Any]]:
    """
    Parse an argument which is a list of strings, where each must be parsed on its own.
    """

    def _parse(string: str) -> List[Any]:
        return [parser(entry) for entry in string.split()]

    return _parse