The extension of a container is an endofunctor. It takes a function g to
This is equivalent to the familiar map g in the case of lists, and does something similar for other containers.
Indexed containers (also known as dependent polynomial functors) are a generalisation of containers, which can represent a wider class of types, such as vectors (sized lists).3
The element type (called the input type) is indexed by shape and position, so it can vary by shape and position, and the extension (called the output type) is also indexed by shape.
Michael Abbott; Thorsten Altenkirch; Neil Ghani (2005). "Containers: Constructing strictly positive types". Theoretical Computer Science. 342 (1): 3–27. CiteSeerX 10.1.1.166.34. doi:10.1016/j.tcs.2005.06.002. https://doi.org/10.1016%2Fj.tcs.2005.06.002 ↩
Thorsten Altenkirch, Neil Ghani, Peter Hancock, Conor McBride, and Peter Morris. "Indexed Containers" (PDF). Unpublished manuscript. Retrieved 2008-10-30. {{cite journal}}: Cite journal requires |journal= (help)CS1 maint: multiple names: authors list (link) /wiki/Conor_McBride ↩