@@ -77,9 +77,6 @@ defmodule Record do
77
77
example, is only available inside the `User` module and nowhere else.
78
78
You can find more information in `Kernel.defrecordp/2` docs.
79
79
80
- In general, though, records are used as part of a module's public
81
- interface. For such use cases, Elixir provides record modules.
82
-
83
80
## defrecord
84
81
85
82
By using `defrecord`, a developer can make a Record definition
@@ -97,7 +94,7 @@ defmodule Record do
97
94
user() #=> User[name: "José", age: 25]
98
95
user(age: 26) #=> User[name: "José", age: 26]
99
96
100
- Notice that now, since the record definition is accessible, Elixir
97
+ Notice that now since the record definition is accessible, Elixir
101
98
shows the record nicely formatted, no longer as a simple tuple. We
102
99
can get the raw formatting by passing `raw: true` to `inspect`:
103
100
@@ -112,9 +109,9 @@ defmodule Record do
112
109
User[] #=> User[name: "José", age: 25]
113
110
User[age: 26] #=> User[name: "José", age: 26]
114
111
115
- The macro name is replaced by the module name and the parenthesis
116
- are replaced by brackets. When the shortcut syntax is used, there
117
- is no need to import the record.
112
+ The macro name is replaced by the module name and the parentheses
113
+ are replaced by brackets. When this syntax is used, there is no
114
+ need to import the record.
118
115
119
116
Before we sum up the differences between `defrecord` and
120
117
`defrecordp`, there is one last functionality introduced by
@@ -175,7 +172,7 @@ defmodule Record do
175
172
to_string WeekDate[year: 2013, week: 26, week_day: 4]
176
173
"2013-W26-4"
177
174
178
- A protocol can be implemented for any record defined via `defrecord` .
175
+ A protocol can be implemented for any record.
179
176
"""
180
177
181
178
@type t :: tuple
0 commit comments