[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haskell-beginners
Subject:    Re: [Haskell-beginners] State, StateT, or ST for game settings?
From:       Francesco Ariis <fa-ml () ariis ! it>
Date:       2017-03-19 0:59:05
Message-ID: 20170319005905.GA3462 () casa ! casa
[Download RAW message or body]

On Sat, Mar 18, 2017 at 08:42:38PM -0400, Dave Martin wrote:
> I would like to create a game with a "main menu" offering the user a choice of \
> "playing the game" or accessing a "settings menu," in which he can change defaults \
> that would affect the game play (e.g. board size, etc.). 
> I know (barely) enough about the "IO monad" to write the menus and the basic \
> gameplay, but what device do I need in order to manage the settings? A State monad? \
> A StateT monad transformer? An ST monad? None of the above? I have some basic \
> familiarity with the first two, but not enough to really grasp how they are \
> actually used.

Hello Dave,
    State will do! Of course if you need to mix the two monads (State +
IO) you need a State transformer (StateT)
-F
_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic