Skip to content

Commit 74933b0

Browse files
eksperimentaljosevalim
authored andcommitted
Rename apply/3 second arg (#7873)
Second argument should be named "function_name" and not "fun" as "fun" is generally used for anonymous functions.
1 parent 12a9d55 commit 74933b0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/elixir/lib/kernel.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ defmodule Kernel do
214214
end
215215

216216
@doc """
217-
Invokes the given function `fun` from `module` with the list of
217+
Invokes the given function from `module` with the list of
218218
arguments `args`.
219219
220220
`apply/3` is used to invoke functions where the module, function
@@ -229,9 +229,9 @@ defmodule Kernel do
229229
[3, 2, 1]
230230
231231
"""
232-
@spec apply(module, atom, [any]) :: any
233-
def apply(module, fun, args) do
234-
:erlang.apply(module, fun, args)
232+
@spec apply(module, function_name :: atom, [any]) :: any
233+
def apply(module, function_name, args) do
234+
:erlang.apply(module, function_name, args)
235235
end
236236

237237
@doc """

0 commit comments

Comments
 (0)