Skip to content

Positional comparison [mp]

Micro pattern

Description

Compare values at related structural positions rather than searching globally for equal values.

Problems

Same index across sequences

Compare corresponding entries and act on their agreement or first difference.

Mirrored positions

Compare opposite sides of a tree, list, or substring.

Adjacent symbols

Compare a symbol with its successor when their relationship determines its contribution.