Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Copy link
Owner Author

@tvon 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