Can There be Monads in Java?

I put together a presentation on creating monads in Java.

Some highlights:

+ Monad: Container that allows chaining operations, preserving semantics

Normally a function maps from one type to another, but the semantics may change. With a monad, operations have the same result type, so multiple operations preserve semantics.

Safer way to enforce semantics than as conventions, and relying on out-of-channel means such as using a lead pipe.

The monad pattern is all about preserving semantics across types. So first you have to decide on some semantics. This is particularly important for this pattern, otherwise you’re just creating extra work for yourself.


Leave a comment

Filed under Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s