https://doi.org/10.71352/ac.37.157
A C++ pearl — self-referring streams
Abstract. Since C++ is a multiparadigm language, experimenting with functional programming techniques in this language seems fruitful. Self-referencing data is widely used in lazy functional languages. In the most interesting cases of self-referencing we produce infinite data. In this case it is possible to express infinite data with a finite structure. This paper makes the concept of stream-oriented programming available for the C++ programmer.
Full text PDF