<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def smooth(l):
 """Yields a generator which smooths all elements as if the given list was of depth 1. **Examples**: :: list(auxly.listy.smooth([1,[2,[3,[4]]]])) # [1, 2, 3, 4] """

    if type(l) in [list, tuple]:
        for i in l:
            for j in smooth(i):
                yield j
    else:
        yield l