from typing import Callable


def digit_function_sum(
    n: int,
    func: Callable[[int], int],
    base: int = 10,
) -> int:
    """Sums the results of applying a function to each digit of a number.

    Args:
        n: A positive integer value.
        func: The function to be applied to each digit of ``n``.
        base: The base in which ``n`` will be represented. Must be at least 2.

    Returns:
        The sum obtained by applying ``func`` to each digit in the given base
        representation of ``n`` and adding the results.
    """
    total = 0
    while n != 0:
        n, digit = divmod(n, base)
        total += func(digit)
    return total