anchor.diff:  -include("market_types.hrl").
   
   
  +-record(state, {
  +     name                   :: atom()
  +    ,portfolio = dict:new() :: dict()
  +    ,cashflow  = []         :: list()
  +}).
  +
  +
   %% ============================================================================
   %% API
   %% ============================================================================
  
positive.code: 
  init([Name]) ->
      self() ! init,
      {ok, {Name, [], []}}.
  
  
  terminate(_Reason, 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]),
  