defmodule FunctionInvoker do def invoke(server, module, function, args) do server |> GenServer.call({:call, module, function, args}) end def init([]) do {:ok, []} end def handle_call({:call, module, function, args}, _from, state) do {:reply, apply(module, function, args), state} end end