def afegeix_intercalant(it1, it2, f):
    
    for elem in it1:
        if f(elem):
            yield elem
            n = next(it2)
            yield n
        else:
            yield elem
