Boxdouble
Boxdouble is a conceptual data construct used to store two related values within a single container, exposing operations on the pair as a unit. It appears in theoretical discussions of product types and in educational programming examples to illustrate dual values and their interactions. The term is commonly encountered in tutorials and puzzle literature rather than as a standardized language feature.
A Boxdouble comprises two slots, typically labeled first and second, or left and right. It maintains an
In programming contexts, a Boxdouble is often represented as a product type or a labeled record with
Use cases for Boxdouble span coordinates (x, y), complex numbers (real, imaginary), or paired states in automata
Variants include nested Boxdoubles (a Boxdouble of Boxdoubles) and typed Boxdoubles that enforce specific component types.