Monads for Java Developers: One Pattern Behind Optional, Stream and CompletableFuture
You have probably written flatMap hundreds of times. However, you may never have called it a monad, and that is perfectly fine. In this article, we will look at the one pattern that Optional, Stream and CompletableFuture share. Then we will see what…