27 Sep 2017, 10:07 • c++, python • 808 views
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++.
26 Sep 2017, 09:20 • c++, algebraic types • 125 views
The recently released C++17 provides a new type,
std::variant, for implementing sum types. This post focusses on its basic use.
3 Oct 2017, 07:07 • c++, catamorphism • 2160 views
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++.
15 Oct 2017, 17:02 • monads, c++ • 191 views • 1 comment
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.