from typing import Callable
from typing import List


def score_digits(digit: int) -> Callable[[List[int]], int]:
    """ Generate a digit scoring function """
    def score_digit(dice: List[int]) -> int:
        """ Digit x number of digits """
        return digit * dice.count(digit)
    return score_digit