@@ -105,7 +105,7 @@ defmodule Kernel do
105
105
defmacro left -- right
106
106
107
107
@ doc """
108
- Boolean or. Arguments needs to necessarily be booleans.
108
+ Boolean or. Arguments must be booleans.
109
109
Allowed in guard clauses.
110
110
111
111
## Examples
@@ -117,7 +117,7 @@ defmodule Kernel do
117
117
defmacro left or right
118
118
119
119
@ doc """
120
- Boolean and. Arguments needs to necessarily be booleans.
120
+ Boolean and. Arguments must be booleans.
121
121
Allowed in guard clauses.
122
122
123
123
## Examples
@@ -129,7 +129,7 @@ defmodule Kernel do
129
129
defmacro left and right
130
130
131
131
@ doc """
132
- Boolean xor. Arguments needs to necessarily be booleans.
132
+ Boolean xor. Arguments must be booleans.
133
133
Allowed in guard clauses.
134
134
135
135
## Examples
@@ -141,7 +141,7 @@ defmodule Kernel do
141
141
defmacro left xor right
142
142
143
143
@ doc """
144
- Boolean not. Argument needs to necessarily be a boolean.
144
+ Boolean not. Argument must be a boolean.
145
145
Allowed in guard clauses.
146
146
147
147
## Examples
@@ -153,7 +153,7 @@ defmodule Kernel do
153
153
defmacro not arg
154
154
155
155
@ doc """
156
- It receives any argument and returns true if it is false
156
+ Receives any argument and returns true if it is false
157
157
or nil. Returns false otherwise. Not allowed in guard
158
158
clauses.
159
159
@@ -168,8 +168,8 @@ defmodule Kernel do
168
168
defmacro ! arg
169
169
170
170
@ doc """
171
- Return true if left is less than right.
172
- As Erlang, Elixir can compare any term. Allowed in guard clauses.
171
+ Returns true if left is less than right.
172
+ Like Erlang, Elixir can compare any term. Allowed in guard clauses.
173
173
174
174
## Examples
175
175
@@ -180,8 +180,8 @@ defmodule Kernel do
180
180
defmacro left < right
181
181
182
182
@ doc """
183
- Return true if left is more than right.
184
- As Erlang, Elixir can compare any term. Allowed in guard clauses.
183
+ Returns true if left is more than right.
184
+ Like Erlang, Elixir can compare any term. Allowed in guard clauses.
185
185
186
186
## Examples
187
187
@@ -192,8 +192,8 @@ defmodule Kernel do
192
192
defmacro left > right
193
193
194
194
@ doc """
195
- Return true if left is less than or equal to right.
196
- As Erlang, Elixir can compare any term. Allowed in guard clauses.
195
+ Returns true if left is less than or equal to right.
196
+ Like Erlang, Elixir can compare any term. Allowed in guard clauses.
197
197
198
198
## Examples
199
199
@@ -204,8 +204,8 @@ defmodule Kernel do
204
204
defmacro left <= right
205
205
206
206
@ doc """
207
- Return true if left is more than or equal to right.
208
- As Erlang, Elixir can compare any term. Allowed in guard clauses.
207
+ Returns true if left is more than or equal to right.
208
+ Like Erlang, Elixir can compare any term. Allowed in guard clauses.
209
209
210
210
## Examples
211
211
@@ -221,7 +221,7 @@ defmodule Kernel do
221
221
This operator considers 1 and 1.0 to be equal. For strict
222
222
comparison, use `===` instead.
223
223
224
- As Erlang, Elixir can compare any term. Allowed in guard clauses.
224
+ Like Erlang, Elixir can compare any term. Allowed in guard clauses.
225
225
226
226
## Examples
227
227
@@ -240,7 +240,7 @@ defmodule Kernel do
240
240
This operator considers 1 and 1.0 to be equal. For strict
241
241
comparison, use `!==` instead.
242
242
243
- As Erlang, Elixir can compare any term. Allowed in guard clauses.
243
+ Like Erlang, Elixir can compare any term. Allowed in guard clauses.
244
244
245
245
## Examples
246
246
@@ -254,7 +254,7 @@ defmodule Kernel do
254
254
255
255
@ doc """
256
256
Returns true if the two items are strictly equal.
257
- As Erlang, Elixir can compare any term. Allowed in guard clauses.
257
+ Like Erlang, Elixir can compare any term. Allowed in guard clauses.
258
258
259
259
## Examples
260
260
@@ -269,7 +269,7 @@ defmodule Kernel do
269
269
270
270
@ doc """
271
271
Returns true if the two items are strictly not equal.
272
- As Erlang, Elixir can compare any term. Allowed in guard clauses.
272
+ Like Erlang, Elixir can compare any term. Allowed in guard clauses.
273
273
274
274
## Examples
275
275
@@ -411,7 +411,7 @@ defmodule Kernel do
411
411
end
412
412
413
413
@ doc """
414
- As binary_to_list/1, but returns a list of integers corresponding to the bytes
414
+ Like binary_to_list/1, but returns a list of integers corresponding to the bytes
415
415
from position `start` to position `stop` in `binary`. Positions in the binary
416
416
are numbered starting from 1.
417
417
"""
@@ -1092,7 +1092,7 @@ defmodule Kernel do
1092
1092
end
1093
1093
1094
1094
@ doc """
1095
- Returns a binary data which is the result of encoding the given term
1095
+ Returns a binary which is the result of encoding the given term
1096
1096
according to the Erlang external term format.
1097
1097
1098
1098
This can be used for a variety of purposes, for example, writing a term
@@ -1517,7 +1517,7 @@ defmodule Kernel do
1517
1517
end
1518
1518
1519
1519
@doc """
1520
- Check if the given structure is an exception.
1520
+ Checks if the given structure is an exception.
1521
1521
1522
1522
## Examples
1523
1523
@@ -1542,7 +1542,7 @@ defmodule Kernel do
1542
1542
end
1543
1543
1544
1544
@ doc """
1545
- Check if the given structure is a record. It is basically
1545
+ Checks if the given structure is a record. It is basically
1546
1546
a convenient macro that checks the structure is a tuple and
1547
1547
the first element matches the given kind.
1548
1548
@@ -1569,7 +1569,7 @@ defmodule Kernel do
1569
1569
end
1570
1570
1571
1571
@ doc """
1572
- Check if the given argument is a record.
1572
+ Checks if the given argument is a record.
1573
1573
"""
1574
1574
defmacro is_record ( thing ) do
1575
1575
case __CALLER__ . in_guard? do
@@ -1586,7 +1586,7 @@ defmodule Kernel do
1586
1586
end
1587
1587
1588
1588
@ doc """
1589
- Check if the given argument is a regex.
1589
+ Checks if the given argument is a regex.
1590
1590
"""
1591
1591
defmacro is_regex ( thing ) do
1592
1592
quote do
@@ -1595,7 +1595,7 @@ defmodule Kernel do
1595
1595
end
1596
1596
1597
1597
@doc """
1598
- Check if the given argument is a range.
1598
+ Checks if the given argument is a range.
1599
1599
"" "
1600
1600
defmacro is_range(thing) do
1601
1601
quote do
@@ -1674,7 +1674,7 @@ defmodule Kernel do
1674
1674
end
1675
1675
1676
1676
If the protocol is invoked with a data type that is not an Atom,
1677
- nor Tuple, nor List, nor BitString, Elixir will now dispatch to
1677
+ a Tuple, a List, or a BitString, Elixir will now dispatch to
1678
1678
Any. That said, the default behavior could be implemented as:
1679
1679
1680
1680
defimpl Blank , for: Any do
@@ -1701,8 +1701,8 @@ defmodule Kernel do
1701
1701
In the example above, we have implemented `blank? ` for
1702
1702
`RedBlack . Tree ` that simply delegates to `RedBlack . empty? ` passing
1703
1703
the tree as argument . This implementation doesn 't need to be defined
1704
- inside the `RedBlack` tree or inside the record, but anywhere in
1705
- the code.
1704
+ inside the `RedBlack` tree or inside the record; it can be defined
1705
+ anywhere in the code.
1706
1706
1707
1707
Finally, since records are simply tuples, one can add a default
1708
1708
protocol implementation to any record by defining a default
@@ -1752,8 +1752,8 @@ defmodule Kernel do
1752
1752
1753
1753
## Examples
1754
1754
1755
- For example, in other to write tests using the ExUnit framework,
1756
- a developers should use the `ExUnit.Case` module:
1755
+ For example, in order to write tests using the ExUnit framework,
1756
+ a developer should use the `ExUnit.Case` module:
1757
1757
1758
1758
defmodule AssertionTest do
1759
1759
use ExUnit.Case, async: true
@@ -1811,9 +1811,9 @@ defmodule Kernel do
1811
1811
inspect(:foo)
1812
1812
#=> ":foo"
1813
1813
1814
- Notice the inspect protocol does not necessarily return a valid Elixir
1815
- terms representation. In such cases, the inspected result must start
1816
- with `#`. For example, inspecting a function will return:
1814
+ Note that the inspect protocol does not necessarily return a valid
1815
+ representation of an Elixir term . In such cases, the inspected result must
1816
+ start with `#`. For example, inspecting a function will return:
1817
1817
1818
1818
inspect &1 + &2
1819
1819
#=> #Function<...>
@@ -2386,11 +2386,10 @@ defmodule Kernel do
2386
2386
end
2387
2387
2388
2388
@ doc """
2389
- Allows you to destructure two lists, assigning each
2390
- term in the right to the left. Differently from pattern
2391
- matching via `=`, if the sizes of the left and right
2392
- lists don't match,, structuring simply stops instead
2393
- of raising an error.
2389
+ Allows you to destructure two lists, assigning each term in the right to the
2390
+ matching term in the left. Unlike pattern matching via `=`, if the sizes of
2391
+ the left and right lists don't match, destructuring simply stops instead of
2392
+ raising an error.
2394
2393
2395
2394
## Examples
2396
2395
@@ -2400,7 +2399,7 @@ defmodule Kernel do
2400
2399
z #=> 3
2401
2400
2402
2401
Notice in the example above, even though the right
2403
- size has more entries than the left, structuring works
2402
+ size has more entries than the left, destructuring works
2404
2403
fine. If the right size is smaller, the remaining items
2405
2404
are simply assigned to nil:
2406
2405
0 commit comments