scala solution
scala\nobject Solution {\n  def minImpossibleOR(nums: Array[Int]): Int =\n    val set = nums.to(Set)\n    (0 to 30).map(1 << _).find(!set.contains(_)).getOrElse
```scala\nobject Solution {\n  def minImpossibleOR(nums: Array[Int]): Int =\n    val set = nums.to(Set)\n    (0 to 30).map(1 << _).find(!set.contains(_)).getOrElse(-1)\n}\n```
['Scala']