Using the Standard C++ Library in a Functional style. The standard C++ library offers a number of algorithms that have nearly exact analogues in functional languages, and are used in almost the same way. In particular std::accumulate and std::transform are powerful, and very general, algorithms. In functional programming literature, accumulate is usually referred to as …
Monthly Archives: February 2007
What is currying? an aha! moment
Since it really is an aha! moment, the best I can do is tell you what led me to it, and hope that helps.There is a difference between partial application and currying that most experts ignore, because they already understand, but they lie in wait ready to tell you that you have it all wrong.And …
Functional Programming in C++ Part 1
Introduction C++ is known to be a multi-paradigmed language. This is often construedto mean you can program in both a procedural and and object orientedstyle. This is too limiting a view. C++, particularly with modernlibrary support, is more than capable of supporting programming inthe functional style. Even without modern libraries like boost, orstd::tr1, the Standard …