Types as Interfaces
For the past few days, I have been toying with an idea for a board game. To test
it out, I wanted to write a simple implementation of it. Here’s an example of a
type we might need in a critical phase of the game.
-- | A quote for a proposal.
data Quote = Quote
{ _proposal :: Proposal
, _premium :: Int
, _share :: Int
}
In that phase, values of this type need to be communicated back and forth
between players in a unicast fashion, so we might want to add fields to indicate
who sent it and who rece...
Read more at two-wrongs.com