Programming C++ STL data structures in a functional way (inspired by collections as monads in Scala)