-
Notifications
You must be signed in to change notification settings - Fork 601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add koan "You can use pattern matching to define [...]" #224
Conversation
Koan added following comment on Github. elixirkoans#222 (comment) [quote] And, in fact, you can define multiple cases for a function using this sytnax: ``` lolwat = fn "lol" -> "wat" _ -> "haha" end lolwat.("lol") # => "wat" lolwat.("anything") # => "haha" lolwat.("rly") # => "haha" ``` [/quote]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe rename “format_reault” to something like inspirational_quote? It would at least sound right for the :ok arm of the function 😅
@felipesere You're right, that does read better. I've renamed the function. Thanks for reviewing the pull request. Is there anything else? :) |
Yeah, one key thing is keeping CI happy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contributing! ❤️💙💚💛💜
Just needs answers added to the test suite to keep CI green 🍏
Thanks guys, I'll take a look at those tests for the CI. :) [edit] The expected koan result has been added to |
Thank you!!! |
Thanks Felipe! :) |
Add koan "You can use pattern matching to define [...]"
Add new koan after discussion in Github issue:
#222 (comment)
[quote]
And, in fact, you can define multiple cases for a function using this sytnax:
[/quote]