Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Monads

Name: Anonymous 2013-06-08 7:57

Is it possible to learn monads in Java? I don't want to have to learn Haskell or Scala in order to understand them.

Name: Anonymous 2013-06-08 8:11

using haskell or scala wont help you understand monads at all

just because it's vaguely based on a concept from category theory and uses the same name..

Name: Anonymous 2013-06-08 8:31

It's possible, but the syntax will suck balls both in Java and in Scala. Learn Haskell, motherfucker.

Name: Anonymous 2013-06-08 9:11

A monad is a typeclass that inherits Functor and has two functions:
return :: a -> m a
and
>>= :: m a -> (a -> m b) -> m b
For a monad to be useful, the definitions of return and >>= must satisfy a couple of laws.

Name: Anonymous 2013-06-08 9:18

Monad isn't an exclusive feature of Haskell or any other functional language. It's a triad that is made up of a monad type constructor, a monad return function and a monad bind function. I don't use Java so I have no idea how to translate the idea of monads to Java.

Name: Anonymous 2013-06-08 9:18

Why do you want to understand monads if you're not using Haskell or Scala anyway?

Name: Anonymous 2013-06-08 9:19


Don't change these.
Name: Email:
Entire Thread Thread List