Functional programming in C++
I remember being in university, fascinated about programming, and already quite adept at writing BASIC, Pascal, Logo, and simple C++. I think it was in my second year when I took a course on functional programming. The teacher was very passionate and eager to show us the wonders of this paradigm, explaining a lot of concepts that I couldnāt quite grasp. The course turned into a complete miss for me, since the only thing I learned was how to write imperative code in Lisp and how to translate the idioms I knew into something that would work in this weird language that wears its parentheses on the outside of expressions.
I tried to go back to functional programming after starting my career as a software engineer. There were plenty of resources online, only the way they explained the paradigm didnāt help. āItās basically category theory,ā they said. Everything is a function, even numbers (check out Church encoding). You...