Last active
April 20, 2019 15:54
Revisions
-
ScottRadcliff revised this gist
Apr 20, 2019 . 1 changed file with 14 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,4 +2,17 @@ defmodule Sample.Signature do def match(1), do: IO.puts "Matched 1" def match(2), do: IO.puts "Matched 2" def match(number), do: IO.puts "Matched #{number} dynamically" end # iex "signature.exs" # Sample.Signature.match(1) # Matched 1 # :ok # # Sample.Signature.match(2) # Matched 2 # :ok # # Sample.Signature.match(22) # Matched 22 dynamically # :ok -
ScottRadcliff created this gist
Apr 20, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ defmodule Sample.Signature do def match(1), do: IO.puts "Matched 1" def match(2), do: IO.puts "Matched 2" def match(number), do: IO.puts "Matched #{number} dynamically" end