Put in order · JavaScript and TypeScript course · Module 12: Functional Programming
Stages of Refactoring to Functional Style
Arrange the stages of refactoring from imperative to functional code:
Items to put in order
- Wrapping effects in functors (Maybe/Either)
- Identifying side effects
- Extracting pure functions
- Replacing loops with map/filter/reduce
- Introducing composition (pipe/compose)
You can check the correct answer by solving this task in the CodeWorlds game.