Speaker Deck

Unlocking the Magic of Monads with Java 8 - [JavaOne 2014]

by Oleg Šelajev

Published September 29, 2014 in Programming

This code-heavy session demystifies what monads are and outlines reasons why you would even want to introduce them into your code. It takes a look at the traditional definition of monads and offers a corresponding type definition in Java. You’ll see a sample Java 8 implementation of a “Promise” monad, which represents the result of async computation, to help answer practical questions about monads. Also, the presentation goes over the laws of monads and shows that you can have a proper monad in Java if you are brave enough to allow the underlying platform to change the rules a bit. PS: You won’t be penalized or ridiculed during this session for your (lack of) Haskell knowledge!