See https://cwiki.apache.org/confluence/display/SPARK/Spark+Code+Style+Guide#SparkCodeStyleGuide-CurlyBraces

You can do
```scala
if  (x >= lb && x < ub) Iterator(item) else empty\
```