top | item 42980704 (no title) ai_ | 1 year ago It's useful for combinators, like flatMap. For instance if you want to flatten an iterator of optional values into the values of all some elements. discuss order hn newest dehrmann|1 year ago Is it worth using a custom library so you can do.flatMap(Maybe::stream)instead of.filter(Optional::isPresent).map(Optional::get)
dehrmann|1 year ago Is it worth using a custom library so you can do.flatMap(Maybe::stream)instead of.filter(Optional::isPresent).map(Optional::get)
dehrmann|1 year ago
.flatMap(Maybe::stream)
instead of
.filter(Optional::isPresent).map(Optional::get)