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.

This series of articles are a product of my personal research on functional programming.
I will try to simplify all the concepts without losing the original meaning in the way.
To help the transition between traditional programming and functional one, I will use C# at least
in the first few post.
Let’s try it!

I think that many of us need to index something using two or more fields. Well, the first and easiest way to solve it is using two Hastables (Hashmaps, Dictionaries,…) with the different fields as keys. Just like:

Yes, I know, that wasn’t very creative. But we are developers and I think you started coding with a simple “Hello World!” program in C, PHP, JAVA or another language. And, as this is my first post, I will name it like my first program too.