anchor.diff:  -include("market_types.hrl").
   
   
  +-record(state, {
  +     name                   :: atom()
  +    ,portfolio = dict:new() :: dict()
  +    ,cashflow  = []         :: list()
  +}).
  +
  +
   %% ============================================================================
   %% API
   %% ============================================================================
  
positive.code:     },
  
      % Update accumulated data
      {
          {portfolio, NewPortfolio}, {cashflow, NewCashFlow}
      } = market_lib:transaction(
          TransactionData,
          Portfolio,
          CashFlow
      ),
  
      market_scribe:log_transaction(TransactionData),
  
      % Print accumulated values to stdout
      NewPortfolioList = dict:to_list(NewPortfolio),
      CashBalance = lists:sum(CashFlow),
      io:format("~p PORTFOLIO:~p~n", [Name, NewPortfolioList]),
      io:format("~p CASH BALANCE:~p~n", [Name, CashBalance]),
      io:format("~n"),
  
      {noreply, {Name, NewPortfolio, NewCashFlow}, hibernate};
  
  handle_info(_Msg, State) ->
      {noreply, State}.
  
negative.code:     {noreply, State}.
  
  
  handle_info(init, State) ->
      market_ticker ! {subscribe, self()},
      {noreply, State, hibernate};
  
  handle_info({ticker, {prices, Prices}}, #state{name=Name}=State) ->
      % Decide what to do
      {Symbol, Price} = market_lib:choice(Prices),
      TransactionType = market_lib:choice([buy, sell]),
  