How is for comprehension returning None on comparison?

后端 未结 0 1623

How is a below printed as None as the max is 3 here

val firstNum: Option[Int] = None
val secondNum: Option[Int] = Some(3)

val a = for {
  f <- firstNum
  s &l         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题