The way the C++ code looks makes me think that the language wasn't designed with this in mind. Modern programming concepts are really stretching the syntax of older languages to the point that there is just too much noise that is distracting from what is actually being done which makes simple things look confusing and complicated. I guess there is a reason Haskell code was used to demonstrate the concept.