Skip to content

Commit

Permalink
Remove spaces between "fn" and "(" (#4747)
Browse files Browse the repository at this point in the history
  • Loading branch information
eksperimental authored and whatyouhide committed Jun 1, 2016
1 parent 17f4d67 commit 4f31dda
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/elixir/lib/keyword.ex
Expand Up @@ -104,7 +104,7 @@ defmodule Keyword do
## Examples
iex> Keyword.new([:a, :b], fn (x) -> {x, x} end)
iex> Keyword.new([:a, :b], fn(x) -> {x, x} end)
[a: :a, b: :b]
"""
Expand Down
6 changes: 3 additions & 3 deletions lib/elixir/lib/list.ex
Expand Up @@ -117,10 +117,10 @@ defmodule List do
## Examples
iex> List.foldl([5, 5], 10, fn (x, acc) -> x + acc end)
iex> List.foldl([5, 5], 10, fn(x, acc) -> x + acc end)
20
iex> List.foldl([1, 2, 3, 4], 0, fn (x, acc) -> x - acc end)
iex> List.foldl([1, 2, 3, 4], 0, fn(x, acc) -> x - acc end)
2
"""
Expand All @@ -135,7 +135,7 @@ defmodule List do
## Examples
iex> List.foldr([1, 2, 3, 4], 0, fn (x, acc) -> x - acc end)
iex> List.foldr([1, 2, 3, 4], 0, fn(x, acc) -> x - acc end)
-2
"""
Expand Down
2 changes: 1 addition & 1 deletion lib/elixir/lib/stream.ex
Expand Up @@ -430,7 +430,7 @@ defmodule Stream do
"""
@spec interval(non_neg_integer) :: Enumerable.t
def interval(n) do
unfold 0, fn (count) ->
unfold 0, fn(count) ->
:timer.sleep(n)
{count, count + 1}
end
Expand Down
4 changes: 2 additions & 2 deletions lib/elixir/test/elixir/enum_test.exs
Expand Up @@ -249,7 +249,7 @@ defmodule EnumTest do
assert Enum.join(["", "", 1, 2, "", 3, "", "\n"], ";") == ";;1;2;;3;;\n"
assert Enum.join([""]) == ""

assert Enum.join(fn (acc, _) -> acc end, ".") == ""
assert Enum.join(fn(acc, _) -> acc end, ".") == ""
end

test "map/2" do
Expand All @@ -263,7 +263,7 @@ defmodule EnumTest do
assert Enum.map_join([1, 2, 3], &(&1 * 2)) == "246"
assert Enum.map_join(["", "", 1, 2, "", 3, "", "\n"], ";", &(&1)) == ";;1;2;;3;;\n"
assert Enum.map_join([""], "", &(&1)) == ""
assert Enum.map_join(fn (acc, _) -> acc end, ".", &(&1 + 0)) == ""
assert Enum.map_join(fn(acc, _) -> acc end, ".", &(&1 + 0)) == ""
end

test "map_reduce/3" do
Expand Down
6 changes: 3 additions & 3 deletions lib/elixir/test/erlang/function_test.erl
Expand Up @@ -49,9 +49,9 @@ function_parens_test() ->
{1, _} = eval("(fn(1) -> 1 end).(1)"),
{3, _} = eval("(fn(1, 2) -> 3 end).(1, 2)"),

{0, _} = eval("(fn () -> 0 end).()"),
{1, _} = eval("(fn (1) -> 1 end).(1)"),
{3, _} = eval("(fn (1, 2) -> 3 end).(1, 2)").
{0, _} = eval("(fn() -> 0 end).()"),
{1, _} = eval("(fn(1) -> 1 end).(1)"),
{3, _} = eval("(fn(1, 2) -> 3 end).(1, 2)").

%% Function calls

Expand Down

0 comments on commit 4f31dda

Please sign in to comment.