Functors In C++

1 mainWhen you look at the word “functor”, the first thing that comes to mind is that it looks very similar to “function”. The word actually comes from a field called category theory, which is an abstract branch of mathematics. A category basically consists of objects that are linked to each other in certain ways. This is an extremely simplistic view of a very complex field of mathematics. But basically, that’s what it’s about! As it turns out, this mathematical concept is really useful in the world of programming. If used in the right way, it can be a very powerful tool in your coding arsenal. So what exactly is a functor in the context of programming? How do we use it?   Continue reading “Functors In C++”