Reword function pattern matching example
This commit is contained in:
@@ -69,7 +69,7 @@ defmodule PatternMatching do
|
|||||||
def make_noise(%{type: "dog"}), do: "Woof"
|
def make_noise(%{type: "dog"}), do: "Woof"
|
||||||
def make_noise(_anything), do: "Eh?"
|
def make_noise(_anything), do: "Eh?"
|
||||||
|
|
||||||
koan "Functions can declare what kind of arguments they accept" do
|
koan "Functions perform pattern matching on their arguments" do
|
||||||
cat = %{type: "cat"}
|
cat = %{type: "cat"}
|
||||||
dog = %{type: "dog"}
|
dog = %{type: "dog"}
|
||||||
snake = %{type: "snake"}
|
snake = %{type: "snake"}
|
||||||
|
|||||||
Reference in New Issue
Block a user