The fixpoint operator (\(\mu\)) on functions provides a way of converting nonrecursive functions into recursive ones. Let's learn how to implement it in Python and C++.
The recently released C++17 provides a new type, std::variant, for implementing sum types. This post focusses on its basic use.
In functional programming, fixpoints of data types are used to define recursive types. Let’s see an example of how one can use this technique in C++.
Implementing monads in C++ is a little tricky, since there are no higher-kinded types. We can however use template specialisation to achieve the same effect.