Skip to content

Instantly share code, notes, and snippets.

@tvon
Created December 23, 2015 07:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tvon/85840caa3c8a77271d4d to your computer and use it in GitHub Desktop.
Save tvon/85840caa3c8a77271d4d to your computer and use it in GitHub Desktop.
defmodule Example do
def test(data \\ [], options \\ [])
def test(data, options \\ []) when is_list(data) do
IO.puts "is list"
end
def test(data, options \\ []) when is_bitstring(data) do
IO.puts "is bitsring"
end
end
@tvon
Copy link
Author

tvon commented Dec 23, 2015

Resolution:

Remove defaults from lines 5 and 9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment