From the course: Elixir 101: Essential Functional Programming Techniques
Unlock the full course today
Join today to access over 24,900 courses taught by industry experts.
Challenge: Control flow - Elixir Tutorial
From the course: Elixir 101: Essential Functional Programming Techniques
Challenge: Control flow
- [Instructor] This is your chance to challenge your grasp of control flow structures in Elixir. I'll cover the instructions in this video. On Branch 07_04b in directory chap_seven, is the file flow_challenge.ex. Your challenge is to complete all the functions in this module, so they return the values described in the module and function docs. You'll be classifying elements like we did in chapter six, but using control flow structures with reducers instead of function clauses. The first function elements is done for you. It returns the list of element maps to be used by the other functions. The other functions also have the reducer ready for you. Fill in the function body according to the documentation and with the appropriate control flow. Test your code with the test function. When you're successful, it will return true. Once you've completed the challenge, compare your solution to the ending Branch 07_04e. Good luck,…