5 ms·
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.
by ai_ 2y 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.
- dehrmann 2y agoIs it worth using a custom library so you can do .flatMap(Maybe::stream) instead of .filter(Optional::isPresent).map(Optional::get)