Skip to content

Instantly share code, notes, and snippets.

View clouseauu's full-sized avatar

Daniel Angel Bradford clouseauu

View GitHub Profile
@clouseauu
clouseauu / count_actor.ex
Created July 25, 2016 12:18
ExActor - July 2016
defmodule CountActor do
use ExActor.GenServer, export: :counter
defstart start_link(state), do: initial_state(state)
defcall get, state: 2, do: reply(:two)
defcall get, state: state, do: reply(state)
defcast inc, state: state, do: new_state(state + 1)
defcast dec, state: state, do: new_state(state - 1)
end

Keybase proof

I hereby claim:

  • I am clouseauu on github.
  • I am clouseauu (https://keybase.io/clouseauu) on keybase.
  • I have a public key whose fingerprint is F3E9 6671 3223 9E8A DC18 53BE ADA4 04D0 FF31 CD73

To claim this, I am signing this object: