In this tutorial, you will gain an understanding of what functional programming is and how you can use some functional techniques to help you write more concise and easier to understand code. Functional programming has been around a long time.
What Is Functional Programming?
In simple, terms - functional programming is all about writing very small and concise functions that do one thing well, and then chaining these functions together to do more powerful things. This is a completely different way of coding to non-functional languages. In a non-functional approach, you may use tools like conditional logic, inheritance, objects, and classes to build up the structure of your app. For a simple example, if you had a function that contained a massive if/else statement, in a functional approach, you would refactor it, to remove the conditional statements and build one or more functions, that can be chained together to achieve the same logic.