Abstract. To resolve difficulties in parallel programming, a large number of studies are conducted on parallel skeletons and optimization theorems over skeleton programs. However, two nontrivial tasks still remain unsettled when we need nested data structures: One is composing skeletons to generate and consume them; the other is applying optimization theorems to obtain efficient parallel programs. In this paper, we propose a novel library named GoG (Generators of Generators) library. It provides a set of primitives, GoGs, for production of nested data structures. A program developed with these GoGs is automatically optimized, even in asymptotic complexity, by the optimization mechanism in the library. We show its implementation on the Fortress language and report some experimental results.