comefrom: <doocs>0898.Bitwise ORs of Subarrays_1.py
code: def subarrayBitwiseORs( arr: List[int]) -> int:
      s = set()
      prev = 0
      for i, v in enumerate(arr):
          prev |= v
          curr = 0
          for j in range(i, -1, -1):
              curr |= arr[j]
              s.add(curr)
              if curr == prev:
                  break
      return len(s)
masked: def sample_funcname ( var_0 : List [ int ] ) -> int :
      var_4 = set ( )
      var_6 = 0
      for var_8 , var_9 in enumerate ( var_0 ) :
          var_6 |= var_9
          var_10 = 0
          for var_13 in range ( var_8 , - 1 , - 1 ) :
              var_10 |= var_0 [ var_13 ]
              var_4.add ( var_10 )
              if var_10 == var_6 :
                  break
      return len ( var_4 )
  