I have seen it time and time and again. A novice programmer sits down at the computer with the goal of writing the next big computer application. However, they do not have much experience putting code to screen and end up writing an ever-expanding network of while loops and if statements akin to a maze of paths through an unkempt garden. If one wanted to implement a gazebo in such a garden, they would surely have to rewrite much of the logic. If you have ever found yourself writing code like this, fear not. In this post, I will explain how you can use functional programming concepts to more effectively organize your code. Functional programming? What’s that? When you wrote that maze of loops and if statements, you wrote in a style known as imperative programming. In imperative programming, operations are executed line by line, and each operation modifies the state of your program (your variables) in some way. To contrast this, functional programming revolves around the concept of...
Discord: Eversome#0409