Skip to content

Commit 29b280c

Browse files
committed
Rename function
1 parent 6e63610 commit 29b280c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/elixir/lib/module/types/descr.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,7 @@ defmodule Module.Types.Descr do
11031103
[{name, [], arguments} | acc]
11041104
else
11051105
negs
1106-
|> map_or(fn {ty, lst} ->
1106+
|> non_empty_map_or(fn {ty, lst} ->
11071107
args =
11081108
if subtype?(lst, @empty_list) do
11091109
[to_quoted(ty, opts)]
@@ -1953,7 +1953,7 @@ defmodule Module.Types.Descr do
19531953

19541954
_ ->
19551955
negative_maps
1956-
|> map_or(&map_literal_to_quoted(&1, opts))
1956+
|> non_empty_map_or(&map_literal_to_quoted(&1, opts))
19571957
|> Kernel.then(
19581958
&{:and, [], [map_literal_to_quoted({tag, positive_map}, opts), {:not, [], [&1]}]}
19591959
)
@@ -2306,7 +2306,7 @@ defmodule Module.Types.Descr do
23062306

23072307
_ ->
23082308
negative_tuples
2309-
|> map_or(&tuple_literal_to_quoted(&1, opts))
2309+
|> non_empty_map_or(&tuple_literal_to_quoted(&1, opts))
23102310
|> Kernel.then(
23112311
&{:and, [], [tuple_literal_to_quoted({tag, positive_tuple}, opts), {:not, [], [&1]}]}
23122312
)
@@ -2969,7 +2969,7 @@ defmodule Module.Types.Descr do
29692969

29702970
defp iterator_non_disjoint_intersection?(:none, _map), do: false
29712971

2972-
defp map_or([head | tail], fun) do
2972+
defp non_empty_map_or([head | tail], fun) do
29732973
Enum.reduce(tail, fun.(head), &{:or, [], [&2, fun.(&1)]})
29742974
end
29752975
end

0 commit comments

Comments
 (0)