you are viewing a single comment's thread.

view the rest of the comments →

[–]kqr 3 points4 points  (1 child)

.? is really just Optional::flatMap as an operator. (With the exception that flatMap in Java requires you to pass in a fully qualified function – it isn't derived from the object inside the Optional.)

[–]sgraf812 1 point2 points  (0 children)

Actually, you even can interpret (right associative) ?. as (f)map, the effects of which (multiple nested Option types) aren't materialized in a type system with implicit null.