anchor.diff:      {noreply, State}.
   
   
  -handle_info(init, {Name, [], []}) ->
  -    Portfolio = dict:new(),
  -    CashFlow = [],
  +handle_info(init, State) ->
       market_ticker ! {subscribe, self()},
  -    {noreply, {Name, Portfolio, CashFlow}, hibernate};
  +    {noreply, State, hibernate};
   
  -handle_info({ticker, {prices, Prices}}, {Name, Portfolio, CashFlow}) ->
  +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]),
  
positive.code: -include("market_types.hrl").
  
  
  %% ============================================================================
  %% API
  %% ============================================================================
  
negative.code:     },
  
      % Update accumulated data
      {{portfolio, Portfolio}, {cashflow, CashFlow}} = market_lib:transaction(
          TransactionData,
          State#state.portfolio,
          State#state.cashflow
      ),
  
      market_scribe:log_transaction(TransactionData),
  
      % Print accumulated values to stdout
      io:format("~p PORTFOLIO:~p~n", [Name, dict:to_list(Portfolio)]),
      io:format("~p CASH BALANCE:~p~n", [Name, lists:sum(CashFlow)]),
      io:format("~n"),
  
      {noreply
      ,#state{name=Name, portfolio=Portfolio, cashflow=CashFlow}
      ,hibernate
      };
  
  handle_info(_Msg, State) ->
      {noreply, State}.
  