Skip to content

Commit f4c61da

Browse files
committed
Merge pull request #2180 from MSch/docfix-special_forms-map
Docfix: Use Map.put/3 in Kernel.SpecialForms struct docs.
2 parents 002bf16 + 73a76c6 commit f4c61da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/elixir/lib/kernel/special_forms.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ defmodule Kernel.SpecialForms do
138138
regular map operations:
139139
140140
user = %User{}
141-
%{ user | a_non_struct_key: :value }
141+
Map.put(user, :a_non_struct_key, :value)
142142
143143
An update operation specific for structs is also available:
144144

0 commit comments

Comments
 (0)