就像是
def option[T](v: T): Option[T] = if (v == null) None else Some(v)
我非常高兴自己定义这个实用程序方法,但只是想知道它是否已经存在于某个地方.
scala
scala ×1