juan_gandhi: (VP)
Juan-Carlos Gandhi ([personal profile] juan_gandhi) wrote2013-07-16 04:26 pm
Entry tags:

scala option map fuckup

scala> def f(x:String) = null
f: (x: String)Null

scala> Some("abc") map f
res3: Option[Null] = Some(null)

[identity profile] aliaksandr famin (from livejournal.com) 2013-07-18 11:55 am (UTC)(link)
В наших реалиях null - это значение. До тех пор пока String - это ref, а не val.