Skip to content
Advertisement

How to peek on an Optional?

I want to use the fluent api of Optional and apply two Consumers to it.

I’m dreaming about something like this:

JavaScript

How do I apply several Consumers to an Optional?

Advertisement

Answer

You can use this syntax:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement