Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Elixir - valentine edition

Saša Jurić
February 14, 2017

Elixir - valentine edition

Saša Jurić

February 14, 2017
Tweet

More Decks by Saša Jurić

Other Decks in Programming

Transcript

  1. def bank_account_loop(balance) do receive do {:deposit, amount} -> bank_account_loop(balance +

    amount) {:withdraw, amount} -> bank_account_loop(balance - amount) {:balance, caller_pid} -> send(caller_pid, balance) bank_account_loop(balance) end end
  2. db connection background job request handler state request handler request

    handler request handler request handler request handler state state state background job background job background job db connection db connection db connection