How to do Functional Programming
With the square drawing tool
2 min readJul 11, 2021
Introduction:
Functional programming coupled with GUI elements is used to create a powerful free drawing tool. Therefore, laying the foundation of developing software utility apps is known as Functional Programming.
What is Functional Programming?
Functional Programming is also known as ‘FP’. Which is a way of thinking about software construction by creating pure functions.
Why should we do ‘Functional Programming’?
It helps us to solve problems functionally in a simpler way. It improves modularity. It allows us to solve complex problems in our programs.
How to start Functional Programming?
You should start by understanding these basic concepts:
- Recursion - In computer engineering, recursion is a concept of solving a problem such that the solution of the main problem depends on the solutions of smaller copies of the same problem.
- Pure function - In computer science, a pure function is a function that has the following properties: The function return values are identical for identical arguments. The function application has no side effects.
- Closure - A closure is a method for implementing lexically scoped name binding in a programming language with first-class methods. In programming, closure is also known as lexical closure or function closure.
Conclusion:
In this article, we learned what is functional programming and how to do it.
Cheers!