diff --git a/lib/elixir/lib/kernel/special_forms.ex b/lib/elixir/lib/kernel/special_forms.ex index acb062cd694..c3004fdd09e 100644 --- a/lib/elixir/lib/kernel/special_forms.ex +++ b/lib/elixir/lib/kernel/special_forms.ex @@ -1786,6 +1786,15 @@ defmodule Kernel.SpecialForms do &local_function/1 + Note that `&local_function/1` creates a local capture, but + `&__MODULE__.local_function/1` or `&imported_function/1` create a remote + capture. For more information, refer to the ["Functions" section in the Erlang Reference Manual](https://www.erlang.org/doc/system/eff_guide_functions.html#function-calls). + + Whether a capture is local or remote has implications when using hot code + reloading: local captures dispatch to the version of the module that existed + at the time they were created, while remote captures dispatch to the current + version of the module. + See also `Function.capture/3`. ## Anonymous functions