Algebraic types and pattern matchingRecursive typesPolymorphismParametric polymorphismAd-hoc polymorphismAlternation-based ad-hoc polymorphismClass-based ad-hoc polymorphismAlternation-based versus class-basedPolymorphic dispatch and the visitor patternUnifying parametric and ad-hoc polymorphismFunctions, types, and patternsThe Strategy patternThe Template patternThe Iterator patternDecoupling behavior and modularizing code