aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2018-12-10 10:06:46 +0100
committerLukas Larsson <[email protected]>2018-12-10 10:06:46 +0100
commit06fc3e9b108c4b0e8c030756bcc272512f92a32f (patch)
tree02f65dfddfeb036af27ce5612e6e84e02553e9ea
parente08ae3d65c3528cf2c2efd9c771efbf0f7494515 (diff)
downloadotp-06fc3e9b108c4b0e8c030756bcc272512f92a32f.tar.gz
otp-06fc3e9b108c4b0e8c030756bcc272512f92a32f.tar.bz2
otp-06fc3e9b108c4b0e8c030756bcc272512f92a32f.zip
stdlib: Update maps:iterator docs to not show iterator
The example should not show the iterator as that is an internal value and if changed can confuse the reader of the documentation. See ERL-796
-rw-r--r--lib/stdlib/doc/src/maps.xml30
1 files changed, 15 insertions, 15 deletions
diff --git a/lib/stdlib/doc/src/maps.xml b/lib/stdlib/doc/src/maps.xml
index a225dea3b5..b2aad54e4c 100644
--- a/lib/stdlib/doc/src/maps.xml
+++ b/lib/stdlib/doc/src/maps.xml
@@ -202,12 +202,12 @@ false</code>
<code type="none">
> M = #{ a => 1, b => 2 }.
#{a => 1,b => 2}
-> I = maps:iterator(M).
-[{a,1},{b,2}]
-> {K1, V1, I2} = maps:next(I).
-{a,1,[{b,2}]}
-> {K2, V2, I3} = maps:next(I2).
-{b,2,[]}
+> I = maps:iterator(M), ok.
+ok
+> {K1, V1, I2} = maps:next(I), {K1, V1}.
+{a,1}
+> {K2, V2, I3} = maps:next(I2),{K2, V2}.
+{b,2}
> maps:next(I3).
none</code>
</desc>
@@ -298,15 +298,15 @@ none</code>
<code type="none">
> Map = #{a => 1, b => 2, c => 3}.
#{a => 1,b => 2,c => 3}
-> Iter = maps:iterator(Map).
-[{a,1},{b,2},{c,3}]
-> {_, _, Iter1} = maps:next(Iter).
-{a,1,[{b,2},{c,3}]}
-> {_, _, Iter2} = maps:next(Iter1).
-{b,2,[{c,3}]}
-> {_, _, Iter3} = maps:next(Iter2).
-{c,3,[]}
-> maps:next(Iter3).
+> I = maps:iterator(Map), ok.
+ok
+> {K1, V1, I1} = maps:next(I), {K1, V1}.
+{a,1}
+> {K2, V2, I2} = maps:next(I1), {K2, V2}.
+{b,2}
+> {K3, V3, I3} = maps:next(I2), {K3, V3}.
+{c,3}
+> maps:next(I3).
none</code>
</desc>
</func>