Open
Description
Design
Goal
The Goal is to learn to use recursion and tail call recursion
Learning objectives
Students should be able to
- understand that it's a fundamental pattern in FP
- understand that many core functions are built with recursion
- use recursive functions
- write a recursive function
- understand what tail-call recursion is
- understand that Elm optimizes tail-call recursive functions
- write a tail-call recursive function
Out of scope
Nothing
Concepts
The concept this exercise unlocks is:
recursion
Prerequisites
- lists
- pattern matching
Analyzer
- check that tail call recursion was implemented correctly
- TBD depending on the exercise
Comments
- The exercise should have at least one function with normal recursion and one with tail-call
- Elixir recursion concept for inspiration
- Elixir tail-call-recursion concept for inspiration (also mixed with an unrelated concept)
- There are many existing exercises that already use the concept, try to pick at least 5 of them to practice the concept, and as many as possible to mark as a prerequisite