The ability to define a function that calls itself, see recursion
- What is recursion? Wwhat is recursion? When should it be used?
- What forms or recursion are supported?: Are recursive functions supported? Recursive types? Does the language supports tail recursion?
- Using recursion: How can recursive functions/types be defined?
This exercise handles ordering pizzas. The reference implementation (F#) teaches:
- Know what recursion is.
- Know how to define a recursive function.
- Know how to define a recursive type.
- Know how to write a tail-recursive function.
- Know how to recursively process lists.
Track | Exercise | Changes |
---|---|---|
F# | recursion | None |
JavaScript | recursion | Allow for multiple extra topping, or extra sauces, don't use pattern matching but list destructuring & iteration |