   end
 
   @doc """
-  Performs a cast (fire and forget) operation on the agent state.
+  Performs a cast (*fire and forget*) operation on the agent state.
 
   The function `fun` is sent to the `agent` which invokes the function
-  passing the agent state. The function must return the new state.
-
-  Note that `cast` returns `:ok` immediately, regardless of whether the
-  destination node or agent exists.
+  passing the agent state. The return value of `fun` becomes the new
+  state of the agent.
+
+  Note that `cast` returns `:ok` immediately, regardless of whether `agent` (or
+  the node it should live on) exists.
   """
   @spec cast(agent, (state -> state)) :: :ok
   def cast(agent, fun) when is_function(fun, 1) do

  end

  @doc """
  Starts an agent linked to the current process with the given module
  function and arguments.

  Same as `start_link/2` but a module, function and args are expected
  instead of an anonymous function.
  """
  @spec start_link(module, atom, [any], GenServer.options) :: on_start
  def start_link(module, fun, args, options \\ []) do

  @doc """
  Synchronously stops the agent with the given `reason`.

  It returns `:ok` if the agent terminates with the given
  reason. If the agent terminates with another reason, the call will
  exit.

  This function keeps OTP semantics regarding error reporting.
