aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src
diff options
context:
space:
mode:
authorMarcus Arendt <[email protected]>2014-05-14 15:17:00 +0200
committerMarcus Arendt <[email protected]>2014-05-14 15:17:00 +0200
commit5ade234d37600ea80dbb309f431c615937ea253d (patch)
treef875d844c91fbbca9371817029f77a8953cb8af6 /lib/stdlib/src
parentf8fa18eef29c75109add667df4777635e2d042d3 (diff)
parent6b705ee68e31a07c4547e8d15350472fe54e99ee (diff)
downloadotp-5ade234d37600ea80dbb309f431c615937ea253d.tar.gz
otp-5ade234d37600ea80dbb309f431c615937ea253d.tar.bz2
otp-5ade234d37600ea80dbb309f431c615937ea253d.zip
Merge branch 'fenollp/remove-erl_parse-legacy-map' into maint
* fenollp/remove-erl_parse-legacy-map: Replace local mapl/2 (Erlang < 5.0) unique call by a LC
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r--lib/stdlib/src/erl_parse.yrl21
1 files changed, 6 insertions, 15 deletions
diff --git a/lib/stdlib/src/erl_parse.yrl b/lib/stdlib/src/erl_parse.yrl
index 1dc5fc52a7..e1ae3b7aea 100644
--- a/lib/stdlib/src/erl_parse.yrl
+++ b/lib/stdlib/src/erl_parse.yrl
@@ -848,10 +848,12 @@ build_fun(Line, Cs) ->
end.
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}.
@@ -861,17 +863,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.