from itertools import product


def product_maker(func):
    """
    Returns a customized product function.

    itertools.product yields tuples.  Sometimes, one desires some other type
    of object---for example, strings.  This function transforms the output
    of itertools.product, returning a customized product function.

    Parameters
    ----------
    func : callable
        Any function which accepts an iterable as the single input argument.
        The iterates of itertools.product are transformed by this callable.

    Returns
    -------
    _product : callable
        A customized itertools.product function.

    """
    def _product(*args, **kwargs):
        for prod in product(*args, **kwargs):
            yield func(prod)
    return _product