GenServer Syntax Flashcards
1
Q
define init w/o continue
A
@impl GenServer
def init(stack) do
end
2
Q
define handle_call w/ a reply
A
@impl GenServer
def handle_call(:pop, _from, [h | t] = _state) do
end
3
Q
define handle_cast
A
@impl GenServer
def handle_cast({:push, elem}, state) do
end