a guest Dec 16th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. negotiate({make_bid, Item, Price}, S=#state{}) ->
  2.   if
  3.     (S#state.tradeditem == Item) ->
  4.       do_bid(S#state.other, Item, Price),
  5.       notice(S, "bidding $~p on ~p", [Price, Item]),
  6.       {next_state, negotiate, S#state{ourprice=Price}};
  7.     true ->
  8.       io:format("~p: Cannot bid. Item ~p is not connected with any offer.~n", [, Item]),
  9.       {next_state, negotiate, S#state{}}
  10.   end;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand