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

Pages: 1-

MonadFix magic

Name: Anonymous 2014-02-08 18:21

Supposedly there's a way to make a Goto monad with both backwards and forwards gotos using MonadFix and mdo. How do they do this?
mdo
     a <- label
     cond <- action1
     goto (if cond then a else b)
     action2
     b <- label

Name: Anonymous 2014-02-09 9:04

Why don't you try desugaring it and see what it compiles to?

Name: Anonymous 2014-02-09 12:23

Gotos are the same as continuations, and there's a continuation monad.

Name: Anonymous 2014-02-09 15:30

Name: Anonymous 2014-02-09 22:16

JACKSON 5 GET

Name: Anonymous 2014-02-09 22:37

>>3
Gotos are not the same as continuations.

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