From 06fc3e9b108c4b0e8c030756bcc272512f92a32f Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Mon, 10 Dec 2018 10:06:46 +0100 Subject: 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 --- lib/stdlib/doc/src/maps.xml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'lib/stdlib/doc') 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 > 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 @@ -298,15 +298,15 @@ 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 -- cgit v1.2.3