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

Monads

Name: Anonymous 2009-03-16 7:10

How are monads different than side effects?

Name: Anonymous 2009-03-17 18:34

>>40
That's it thread over. Everybody, please pack up your things and go home.

Name: Anonymous 2009-03-17 18:37

If they called the damn thing "Computation", no one would find them so weird.

Name: Anonymous 2009-03-17 18:55

If they called the damn thing "Warm Fuzzy Thing", no one would find them so weird.

FIXED

Name: Anonymous 2009-03-17 18:58

>>43
Take your "fixed" crap back to /b/, please.

Name: Anonymous 2009-03-17 19:00

>>43
Go back to the Microsoft Research Lab, Simon.

Name: Anonymous 2009-03-17 19:34

If they called the damn thing "Appendable", no one would find them so weird.

Name: Anonymous 2009-03-17 19:38

>>46
Except that's not what a monad is. It's not what a monoid is either.

Name: Anonymous 2009-03-17 19:38

ficsd

Name: Anonymous 2009-03-17 19:53

>>42
If the called the damned thing "State", no one would find them weird.

Because all what it is IS encapsulated state.  But they're fucking self-grandeurized assholes who think that word is beneath them, so they twist and bitch and moan about it instead.

Name: Anonymous 2009-03-17 20:28

>>12
This is the best fucking explanation of monads I've ever read, and none of you faggots are appreciating it properly.

Name: Anonymous 2009-03-17 20:31

>>50
Agreed.

Name: Anonymous 2009-03-17 21:28

>>50
What the fuck?  Monads specifically DON'T have return values representing the changed state; they keep any "state" inside their own guts.

That explanation has nothing to do with how monads are implemented, and only gives one limited example of a use of them, and does it incorrectly.  Either you are >>12, or you have no fucking clue what monads are intended to do (and the former implies the latter).

- Functional programming would generally take encapsulated state as a parameter and return new state data.
- Instead of passing State1 vs State2 around as you call these functions, monads invisibly remember the most recently modified state.
- This last used state is stored behind the monad's name... just like a mutable variable's name.
- You only have to worry about the other parameters & normal return values in your functions, and the syntactic sugar of monads handles the state passing for you.

If you understand pure functional programming, that's all there is.  If you don't, and wonder why the fuck people are passing "state" around, monads won't do you any good anyway.

Name: Anonymous 2009-03-17 21:47

>>52
Cool your jets, tiger. Okay we get it, you know functional programming. Go sip some orange juice now, lol

Name: Anonymous 2009-03-17 22:05

>>49
Because all what it is IS encapsulated state.
No it isn't. You're a moron.

Name: Anonymous 2009-03-17 23:18

>>54
Yes it is.  And you're a moronorom.

Name: Anonymous 2009-03-17 23:53

What about my moronorom?

Name: Anonymous 2009-03-17 23:53

I'm a Mormon.
Latter day saints for the win

Name: Anonymous 2009-03-18 0:31

>>57
Cool story brother

Name: Anonymous 2009-03-18 1:09

Cool story brother
Cool story bro

Back to /b/, please.

Name: Anonymous 2009-03-18 6:04

Resurrection bump

Name: Anonymous 2009-03-18 11:31

>>55
There's no state in the List monad. Fucking moron.

Name: Anonymous 2009-03-18 11:53

                   
References: http://en.wikibooks.org/wiki/Haskell/Category_theory

Name: Anonymous 2009-03-18 12:07

I think the real question is, how are side effects different than monads.

Name: Anonymous 2009-03-18 12:10

There's no state in the List monad. Fucking moron!

Name: Anonymous 2009-03-18 13:12

There's no list in the State monad. Fucking moron!

Name: Anonymous 2009-03-18 13:37

There's no nomads in the moron list. Fucking State!

Name: Anonymous 2009-03-18 13:39

There's no morons in the List state. Fucking Monads.

Name: Anonymous 2009-03-18 17:37

>>52
Yes, that's the entire point of >>12. The fact that you either fail at reading comprehension or don't know how monads work is not my problem.

Name: Anonymous 2009-08-16 22:44

Lain.

Name: Anonymous 2010-11-13 22:27

Name: Anonymous 2010-11-22 23:59

MONADIC BUMP >>= THREAD

Name: Anonymous 2010-11-23 0:13

correct definition of the >>= monad:

(define >>=
  (lambda (f g)
    (error "*** Exception: Monadic Stack Overflow")))

Name: Anonymous 2010-11-25 12:09

Correct definition of >>72 is ``unfunny reddit clown''.

Name: Anonymous 2011-02-02 23:41

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