Refactoring from the Imperative to the Functional StyleThis page was contributed by Venkat Subramaniam under the UPL
This part of the tutorial helps you to learn the functional style equivalent of the imperative style code we often find. As you move forward in your projects, wherever it makes sense, you can change imperative style code to functional style code using the mappings you learn in this tutorial.
In this series we cover the following conversions from the imperative to the functional style:
|Tutorial||Imperative Style||Functional Style Equivalent|
|Converting Simple Loops||
|Converting Loops with Steps||
|Converting foreach with if||
Converting Simple Loops
Converting Simple Imperative Loops to Functional Style.
Converting Loops with Steps
Converting Imperative Loops with Steps to Functional Style.
Converting foreach with if
Converting Imperative Iteration using foreach with if to Functional Style.