The Composite Pattern in Michelson
Processing hierarchical node structures and list accumulations on the Michelson stack.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Composite
ARCANUM SCHOOL: Transmutation // Stackmancy
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// MICHELSON PATTERN //
parameter (list int);
storage int;
code {
UNPAIR;
# Iterate over the composite structure
ITER {
ADD;
};
NIL operation; PAIR
}
Runic Tags:
#structural
#composite
#stack-based smart contracts
#michelson
#tezos