[Development] What is Functional Programming: Functions
A function in functional programming is just as in other paradigms. It’s a sequence of operations that can be named to easily referenciate them. In example:
int Sum(int a, int b) { return a + b; }
or
Func<int, int, int> sum = (a, b) => a + b;
Here you can see two ways of declaring a Function in C#, the traditional (first one) or the functional (second one).The first one is a simple method. The second one is a variable that points to an expresion so you can use it like a method. It’s a little big difference that you will love at the end of this series.