scala oneliner
scala []\nobject Solution {\n  def maximumOr(nums: Array[Int], k: Int): Long =\n    (nums.iterator zip (\n      nums.toList.scanLeft(0)(_ | _).init \n      zip 
```scala []\nobject Solution {\n  def maximumOr(nums: Array[Int], k: Int): Long =\n    (nums.iterator zip (\n      nums.toList.scanLeft(0)(_ | _).init \n      zip \n      nums.reverseIterator.scanLeft(0)(_ | _).toList.reverse.tail\n    ))\n    .map{case (num,(p,s)) => (num.toLong<<k)|p|s}.max \n}\n```
['Scala']