anchor.diff:  -compile(export_all).
   
   
  +%%%----------------------------------------------------------------------------
  +%%% Controlls
  +%%%----------------------------------------------------------------------------
  +
   start() ->
  -    MaxListings = 10,
  +    MaxListings = 5,
  +    MaxBrokers = 3,
       Listings = sets:to_list(sets:from_list(
           [random_symbol() || Stock <- lists:seq(1, MaxListings)]
       )),
   
       register(ticker, spawn(market, ticker, [])),
  -    register(broker, spawn(market, broker, [Listings, ticker, 1000])).
  +
  +    Brokers = [
  +        register(
  +            list_to_atom(string:join(["broker", integer_to_list(I)], "_")),
  +            spawn(market, broker, [Listings, ticker, 1000])
  +        ) ||
  +        I <- lists:seq(1, MaxBrokers)
  +    ].
   
   
   stop() ->
  -    broker ! stop,
  +    MaxBrokers = 3,
  +    Brokers = [
  +        list_to_atom(string:join(["broker", integer_to_list(I)], "_"))||
  +        I <- lists:seq(1, MaxBrokers)
  +    ],
  +
  +    lists:foreach(fun(Broker) -> Broker ! stop end, Brokers),
       ticker ! stop.
   
   
  +%%%----------------------------------------------------------------------------
  +%%% Agents
  +%%%----------------------------------------------------------------------------
   ticker() ->
       receive
           {price_query, Broker, Symbol} ->
  
positive.code:             broker(Listings, Ticker, Interval)
      end.
  
  
  random_symbol() ->
      CharPool = "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
  
negative.code:     list_to_float(Price).
  
  
  %% Pick and return a random element from a given list
  choice(List) ->
      Maximum = length(List),
      Element = random:uniform(Maximum),
  