What is functional programming?
Functional programming is a different way of programming, called a programming paradigm, that uses different syntax with implicit structure to reduce the need for repetitive code.
It is based on a branch of study in computer science that emerged concurrently to the more common procedural programming paradigm. Procedural programming uses step-by-step invocation of commands that explicitly change the memory in a computer. Those who program in procedural languages like C, Fortran, or their derivatives like C++, Java, C#, old-school JavaScript, and typical Python code, eventually find themselves repeating certain patterns in code, and these patterns are represented symbolically in Functional paradigm languages.
The branch of study that Functional paradigm grew from is the Lambda calculus, which is a mathematical notation that expresses computations as functions. The earliest language to use Lambda calculus is LISP (List-Processing Language) (later spelled “Lisp”).
The core characteristic of Lisp is that all if/then logic is implicit. Unique characteristics of Lisp are that its program structure perfectly correlates to the Abstract Syntax Tree (AST) generated during compilation of other languages like C, allowing easier reasoning about program behavior and locating the root cause of bugs. Because you wrote your program in the tree structure, you can trace the execution more easily, allowing you to locate the root cause of bugs easily. Lisp was, at one point, just as popular as C, however it was more expensive to produce Lisp-machines, and not as efficient to run the programs, so it fell out of favor.