def repeatedly(func):
    """Repeat a function taking no argument

    :param func: a function
    :returns: a generator

    >>> import random as rd
    >>> rd.seed(123)
    >>> take(3, repeatedly(rd.random))
    [0.052363598850944326, 0.08718667752263232, 0.4072417636703983]

    """
    while True:
        yield func()
