diff --git a/exercises/two-fer/TwoFer.elm b/exercises/two-fer/TwoFer.elm index 733b6f0f..154bc85f 100644 --- a/exercises/two-fer/TwoFer.elm +++ b/exercises/two-fer/TwoFer.elm @@ -1,11 +1,5 @@ module TwoFer exposing (twoFer) -twoFer : Maybe String -> String twoFer name = - case name of - Just name_ -> - "One for " ++ name_ ++ ", one for me." - - Nothing -> - "One for you, one for me." + Debug.todo "Please implement this function" diff --git a/exercises/two-fer/TwoFer.example.elm b/exercises/two-fer/TwoFer.example.elm index 154bc85f..b9df217c 100644 --- a/exercises/two-fer/TwoFer.example.elm +++ b/exercises/two-fer/TwoFer.example.elm @@ -1,5 +1,8 @@ module TwoFer exposing (twoFer) +twoFer : Maybe String -> String twoFer name = - Debug.todo "Please implement this function" + "One for " + ++ Maybe.withDefault "you" name + ++ ", one for me." diff --git a/exercises/two-fer/tests/Tests.elm b/exercises/two-fer/tests/Tests.elm index adf62462..f6c7c253 100644 --- a/exercises/two-fer/tests/Tests.elm +++ b/exercises/two-fer/tests/Tests.elm @@ -12,10 +12,6 @@ tests = [ test "No name given" <| \() -> Expect.equal "One for you, one for me." (twoFer Nothing) - - -- Once you get the first test passing, remove the - -- `skip <|` (just leave the comma) on the next two - -- lines to continue! , skip <| test "A name given" <| \() ->