# Leaf-vs-Container Special-Casing

> Branching client code on whether an element is a leaf or a container instead of treating them through one interface.

Record: `lex:leaf-vs-container-special-casing`
Kind: anti-pattern
Layer: [Design Patterns Core](https://banes-lab.com/records/layer/design-patterns-core.md)
Canonical: https://banes-lab.com/ontology/lexicon#lex-leaf-vs-container-special-casing

## category

- [Structural Patterns](https://banes-lab.com/records/lex-category/structural-patterns.md)

## referenced-by

- [Composite Pattern](https://banes-lab.com/records/arch/composite-pattern.md)
