A few small things I came across #134

Merged
merged 3 commits into from Jun 16, 2016
Jump to file or symbol
Failed to load files and symbols.
+2 −2
Diff settings

Always

Just for now

Viewing a subset of changes. View all
Prev

"I don't think that word means what you think it means" 😂

Without the argument or a local variable, these references are invoking
Kernel.node/0
http://elixir-lang.org/docs/stable/elixir/Kernel.html#node/0
  • Loading branch information...
iamvery committed Jun 15, 2016
commit a2e3fe6d93b14e9105238f85554c8661e8ad9c53
View
@@ -32,8 +32,8 @@ defmodule Blanks do
|> elem(1)
end
- defp count(:___, acc), do: {node, acc+1}
- defp count({:___, _, _}, acc), do: {node, acc+1}

This comment has been minimized.

@felipesere

felipesere Jun 16, 2016

Collaborator

Good catch! How did this ever work? Where is node?

@felipesere

felipesere Jun 16, 2016

Collaborator

Good catch! How did this ever work? Where is node?

This comment has been minimized.

@iamvery

iamvery Jun 16, 2016

Collaborator

Check out the commit notes a2e3fe6

@iamvery

iamvery Jun 16, 2016

Collaborator

Check out the commit notes a2e3fe6

This comment has been minimized.

@felipesere

felipesere Jun 16, 2016

Collaborator

Thx!

@felipesere

felipesere Jun 16, 2016

Collaborator

Thx!

+ defp count(:___ = node, acc), do: {node, acc+1}
+ defp count({:___, _, _} = node, acc), do: {node, acc+1}
defp count(node, acc), do: {node, acc}
def replace_line([do: ast], replacement_fn), do: [do: replace_line(ast, replacement_fn)]