diff --git a/ch03/BogusPattern.hs b/ch03/BogusPattern.hs index 3ebc279..4ee98db 100644 --- a/ch03/BogusPattern.hs +++ b/ch03/BogusPattern.hs @@ -10,3 +10,7 @@ whichFruit f = case f of equational apple = Apple equational orange = Orange + +betterFruit f = case f of + "apple" -> Apple + "orange" -> Orange