@@ -877,7 +877,7 @@ defmodule Kernel do
877
877
It should not be used in application programs.
878
878
879
879
## Examples
880
- list_to_pid('<0.41 >') #=> <0.4.1>
880
+ list_to_pid('<0.4.1 >') #=> #PID <0.4.1>
881
881
"""
882
882
@ spec list_to_pid ( char_list ) :: pid
883
883
def list_to_pid ( char_list ) do
@@ -905,7 +905,7 @@ defmodule Kernel do
905
905
## Examples
906
906
907
907
make_ref()
908
- #=> #Ref <0.0.0.135>
908
+ #=> #Reference <0.0.0.135>
909
909
910
910
"""
911
911
@ spec make_ref ( ) :: reference
@@ -955,7 +955,7 @@ defmodule Kernel do
955
955
end
956
956
957
957
@ doc """
958
- Returns the node where the given argmuent is located.
958
+ Returns the node where the given argument is located.
959
959
The argument can be a pid, a reference, or a port.
960
960
If the local node is not alive, nonode@nohost is returned.
961
961
@@ -1008,7 +1008,7 @@ defmodule Kernel do
1008
1008
1009
1009
@ doc """
1010
1010
Returns the size of the given argument, which must be a tuple
1011
- or a binary. If possible, please use tuple_size or binary_size.
1011
+ or a binary. If possible, please use ` tuple_size` or ` binary_size` .
1012
1012
"""
1013
1013
@ spec size ( tuple | binary ) :: non_neg_integer
1014
1014
def size ( arg ) do
@@ -1026,7 +1026,7 @@ defmodule Kernel do
1026
1026
current = Kernel.self
1027
1027
child = spawn(fn -> current <- { Kernel.self, 1 + 2 } end)
1028
1028
1029
- receive
1029
+ receive do
1030
1030
{ ^child, 3 } -> IO.puts "Received 3 back"
1031
1031
end
1032
1032
@@ -1064,9 +1064,8 @@ defmodule Kernel do
1064
1064
current = Kernel.self
1065
1065
child = spawn_link(fn -> current <- { Kernel.self, 1 + 2 } end)
1066
1066
1067
- receive
1068
- { ^child, 3 } ->
1069
- IO.puts "Received 3 back"
1067
+ receive do
1068
+ { ^child, 3 } -> IO.puts "Received 3 back"
1070
1069
end
1071
1070
1072
1071
"""
@@ -1108,8 +1107,8 @@ defmodule Kernel do
1108
1107
@ doc """
1109
1108
The same as `term_to_binary/1` but also supports two options:
1110
1109
1111
- * compressed: the level of compression to be used from 0 to 9;
1112
- * minor_version: used to control the details of encoding. Can be 0 or 1,
1110
+ * ` compressed` : the level of compression to be used from 0 to 9;
1111
+ * ` minor_version` : used to control the details of encoding. Can be 0 or 1,
1113
1112
please read http://www.erlang.org/doc/man/erlang.html#term_to_binary-2
1114
1113
for more details
1115
1114
@@ -1136,7 +1135,7 @@ defmodule Kernel do
1136
1135
end
1137
1136
1138
1137
@ doc """
1139
- Returns an integer by the truncating the given number.
1138
+ Returns an integer by truncating the given number.
1140
1139
Allowed in guard clauses.
1141
1140
1142
1141
## Examples
@@ -2003,7 +2002,7 @@ defmodule Kernel do
2003
2002
x * 2
2004
2003
end
2005
2004
2006
- Not only the example is shorter, it solves ambiguity issues. Since
2005
+ Not only is the example shorter, it solves ambiguity issues. Since
2007
2006
`do/end` always matches the furthest call, if we used the `function`
2008
2007
macro as below:
2009
2008
@@ -2034,7 +2033,7 @@ defmodule Kernel do
2034
2033
The `function` macro can also be used to retrieve local or remote
2035
2034
functions:
2036
2035
2037
- f = function(:is_atom, 2 )
2036
+ f = function(:is_atom, 1 )
2038
2037
f.(:foo) #=> true
2039
2038
2040
2039
f = function(List, :flatten, 1)
0 commit comments