Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
functions defs can have multiple implementations in elixir
defmodule Foo do
def my_func({name}) do IO.puts("#{name}") end
def my_func({name, number}) do IO.puts("#{name} #{number}") end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.