Use triple underscore instead of double
This commit is contained in:
@@ -7,8 +7,8 @@ defmodule Blanks do
|
||||
|> elem(0)
|
||||
end
|
||||
|
||||
defp pre(:__, [first | remainder]), do: {first, remainder}
|
||||
defp pre({:__, _, _}, [first | remainder]), do: {first, remainder}
|
||||
defp pre(:___, [first | remainder]), do: {first, remainder}
|
||||
defp pre({:___, _, _}, [first | remainder]), do: {first, remainder}
|
||||
defp pre(node, acc), do: {node, acc}
|
||||
|
||||
def count(ast) do
|
||||
@@ -17,7 +17,7 @@ defmodule Blanks do
|
||||
|> elem(1)
|
||||
end
|
||||
|
||||
defp count(:__, acc), do: {node, acc+1}
|
||||
defp count({:__, _, _}, acc), do: {node, acc+1}
|
||||
defp count(:___, acc), do: {node, acc+1}
|
||||
defp count({:___, _, _}, acc), do: {node, acc+1}
|
||||
defp count(node, acc), do: {node, acc}
|
||||
end
|
||||
|
Reference in New Issue
Block a user