Skip to content

Instantly share code, notes, and snippets.

@benfalk
Created December 8, 2015 21:57
Show Gist options
  • Save benfalk/e802ea8bb6cc77975604 to your computer and use it in GitHub Desktop.
Save benfalk/e802ea8bb6cc77975604 to your computer and use it in GitHub Desktop.
what = :a
[:a, :a, :b, :a] |> Enum.filter(fn
^what -> true
_any -> false
end)
# ** (CompileError) compile_error.exs:3: unbound variable ^what
# (stdlib) lists.erl:1353: :lists.mapfoldl/3
# (elixir) src/elixir_fn.erl:26: :elixir_fn.translate_fn_match/2
# (elixir) src/elixir_fn.erl:9: anonymous fn/3 in :elixir_fn.translate/3
# (stdlib) lists.erl:1353: :lists.mapfoldl/3
# (elixir) src/elixir_fn.erl:14: :elixir_fn.translate/3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment