Control Structures
These are examples of control structures. You may also be interested in:

 Conditional structures
 Exceptions
 Flow-control structures
 Loops



Task

Document common flow-control structures.



One common example of a flow-control structure is the    goto    construct.

Note that   Conditional Structures   and   Loop Structures   have their own articles/categories.



Related tasks

   Conditional Structures
   Loop Structures 


import Control.Monad
import Control.Monad.Trans
import Control.Monad.Exit
 
main = do
    runExitTMaybe $ do
        forM_ [1..5] $ \x -> do
            forM_ [1..5] $ \y -> do
                lift $ print (x, y)
                when (x == 3 && y == 2) $
                    exitWith ()
    putStrLn "Done."