<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_of(cls):
 """ Returns a function that checks that each element in a set is of a specific type. """

    return lambda l: isinstance(l, set) and all(isinstance(x, cls) for x in l)