code: def iapply(function, *iterables):
      
  
      iterables = map(iter, iterables)
      while True:
          args = [next(it) for it in iterables]
          if function is None:
              yield tuple(args)
          else:
              function(*args)
              yield args[0]
docs: Like itertools.imap, but returns the iterable's item/iterables' items instead.