@@ -291,23 +291,6 @@ defmodule Kernel do
291
291
"""
292
292
defmacro left !== right
293
293
294
- @ doc """
295
- Returns an integer or float which is the arithmetical absolute value of `number`.
296
-
297
- Allowed in guard tests.
298
-
299
- ## Examples
300
-
301
- iex> abs(-3.33)
302
- 3.33
303
- iex> abs(-3)
304
- 3
305
- """
306
- @ spec abs ( number ) :: number
307
- def abs ( number ) do
308
- :erlang . abs ( number )
309
- end
310
-
311
294
@ doc """
312
295
Invokes the given `fun` with the array of arguments `args`.
313
296
@@ -317,10 +300,7 @@ defmodule Kernel do
317
300
4
318
301
319
302
"""
320
- @ spec apply ( ( ... -> any ) , list ) :: term
321
- def apply ( fun , args ) do
322
- :erlang . apply ( fun , args )
323
- end
303
+ defmacro apply ( fun , args )
324
304
325
305
@ doc """
326
306
Invokes the given `fun` from `module` with the array of arguments `args`.
@@ -331,9 +311,23 @@ defmodule Kernel do
331
311
[3,2,1]
332
312
333
313
"""
334
- @ spec apply ( atom , atom , list ) :: term
335
- def apply ( module , fun , args ) do
336
- :erlang . apply ( module , fun , args )
314
+ defmacro apply ( module , fun , args )
315
+
316
+ @ doc """
317
+ Returns an integer or float which is the arithmetical absolute value of `number`.
318
+
319
+ Allowed in guard tests.
320
+
321
+ ## Examples
322
+
323
+ iex> abs(-3.33)
324
+ 3.33
325
+ iex> abs(-3)
326
+ 3
327
+ """
328
+ @ spec abs ( number ) :: number
329
+ def abs ( number ) do
330
+ :erlang . abs ( number )
337
331
end
338
332
339
333
@ doc """
@@ -1018,7 +1012,7 @@ defmodule Kernel do
1018
1012
1019
1013
## Examples
1020
1014
1021
- iex> round(5.5)
1015
+ iex> round(5.5)
1022
1016
6
1023
1017
1024
1018
"""
@@ -1458,7 +1452,7 @@ defmodule Kernel do
1458
1452
where the last line is a quoted representation of
1459
1453
1460
1454
[bar: nil | integer]
1461
-
1455
+
1462
1456
## Documentation
1463
1457
1464
1458
By default records are not documented and have `@moduledoc` set to false.
0 commit comments