Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- overloadMe = fn
- {:number, number} -> IO.puts("Your number + 1 is #{number + 1}")
- {:string, string} -> IO.puts(string)
- argument -> IO.puts(argument)
- end
- overloadMe.({:number, 1})
- overloadMe.({:string, "Is this what overloading is?"})
- overloadMe.("Whatever")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement