def just(*args):
    ''' this works as an infinite loop that yields
        the given argument(s) over and over
    '''
    assert len(args) >= 1, 'generators.just needs at least one arg'

    if len(args) == 1: # if only one arg is given
        try:
            # try to cycle in a set for iteration speedup
            return cycle(set(args))
        except:
            # revert to cycling args as a tuple
            return cycle(args)
    else:
        return cycle({args})