def set_combinations(iterable):
    """
    Compute all combinations of sets of sets
    example:
    set_combinations({{b}},{{e},{f}}) returns {{b,e},{b,f}}
    """
    def _set_combinations(iter):
        current_set = next(iter, None)
        if current_set is not None:
            sets_to_combine_with = _set_combinations(iter)
            resulting_combinations = set()
            for c in current_set:
                if not sets_to_combine_with:
                    resulting_combinations.add(frozenset(c))
                for s in sets_to_combine_with:
                    resulting_combinations.add(frozenset(c.union(s)))

            return resulting_combinations

        return set()

    return _set_combinations(iter(iterable))