code: def TakeWhile(self: Iterable, f):
      
      if is_to_destruct(f):
          f = destruct_func(f)
  
      for e in self:
          if not f(e):
              break
          yield e
docs: [
          {
              'self': [1, 2, 3, 4, 5],
              'f': lambda x: x < 4,
              'assert': lambda ret: list(ret)  == [1, 2, 3]
           }
      ]