http://lomeo.livejournal.com/ ([identity profile] lomeo.livejournal.com) wrote in [personal profile] juan_gandhi 2013-07-17 01:12 pm (UTC)

Это же map, всё правильно, он структуру должен сохранять. Тут flatMap нужен
scala> def f(x:String) = null
f: (x: String)Null

scala> Some("abc") flatMap (x => Option(f(x)))
res0: Option[Null] = None

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting