From 6b705ee68e31a07c4547e8d15350472fe54e99ee Mon Sep 17 00:00:00 2001 From: Pierre Fenoll Date: Sun, 29 Dec 2013 18:03:45 +0100 Subject: Replace local mapl/2 (Erlang < 5.0) unique call by a LC --- lib/stdlib/src/erl_parse.yrl | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'lib') diff --git a/lib/stdlib/src/erl_parse.yrl b/lib/stdlib/src/erl_parse.yrl index 7145b0858f..0be6e481b0 100644 --- a/lib/stdlib/src/erl_parse.yrl +++ b/lib/stdlib/src/erl_parse.yrl @@ -803,10 +803,12 @@ build_fun(Line, Cs) -> {'fun',Line,{clauses,check_clauses(Cs, 'fun', Arity)}}. check_clauses(Cs, Name, Arity) -> - mapl(fun ({clause,L,N,As,G,B}) when N =:= Name, length(As) =:= Arity -> - {clause,L,As,G,B}; - ({clause,L,_N,_As,_G,_B}) -> - ret_err(L, "head mismatch") end, Cs). + [case C of + {clause,L,N,As,G,B} when N =:= Name, length(As) =:= Arity -> + {clause,L,As,G,B}; + {clause,L,_N,_As,_G,_B} -> + ret_err(L, "head mismatch") + end || C <- Cs]. build_try(L,Es,Scs,{Ccs,As}) -> {'try',L,Es,Scs,Ccs,As}. @@ -816,17 +818,6 @@ ret_err(L, S) -> {location,Location} = get_attribute(L, location), return_error(Location, S). -%% mapl(F,List) -%% an alternative map which always maps from left to right -%% and makes it possible to interrupt the mapping with throw on -%% the first occurence from left as expected. -%% can be removed when the jam machine (and all other machines) -%% uses the standardized (Erlang 5.0) evaluation order (from left to right) -mapl(F, [H|T]) -> - V = F(H), - [V | mapl(F,T)]; -mapl(_, []) -> - []. %% Convert between the abstract form of a term and a term. -- cgit v1.2.3 From bef120698af5377b258446077a3d852484f79397 Mon Sep 17 00:00:00 2001 From: Danil Zagoskin Date: Sat, 10 May 2014 13:24:11 +0400 Subject: inet: fix typo in inet:getstat/2 doc The word 'received' in 'send_dvi' option description seems to be copy-pasted and not removed --- lib/kernel/doc/src/inet.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/kernel/doc/src/inet.xml b/lib/kernel/doc/src/inet.xml index 4a48a5c3d8..50e1cc290c 100644 --- a/lib/kernel/doc/src/inet.xml +++ b/lib/kernel/doc/src/inet.xml @@ -361,7 +361,7 @@ fe80::204:acff:fe17:bf38 send_dvi -

Average packet size deviation in bytes received sent from the socket.

+

Average packet size deviation in bytes sent from the socket.

send_max -- cgit v1.2.3