❄️ SNOBOL HEX DIFFICULTY: Adept Behavioral

The Template Method of Snobol

A skeletal ritual where the details are filled by the apprentice.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Template Method
ARCANUM SCHOOL: Conjuration // Scaffolding
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// SNOBOL PATTERN //
        * Template Method in SNOBOL4
        DEFINE('POTION_RITUAL(INGREDIENT_FUNC)')

        POTION_RITUAL('ADD_FROG')
        POTION_RITUAL('ADD_NIGHTSHADE')
        :(END)

POTION_RITUAL
        OUTPUT = 'Boil water.'
        EVAL(INGREDIENT_FUNC '()')
        OUTPUT = 'Stir thrice.' :(RETURN)

ADD_FROG
        OUTPUT = 'Add eye of newt and toe of frog.' :(RETURN)

ADD_NIGHTSHADE
        OUTPUT = 'Add drops of deadly nightshade.' :(RETURN)
END

The Template Method establishes the unchangeable framework of a potion ritual—boiling water and stirring. The variable specifics, such as which ingredients to add, are deferred to specific sub-routines evaluated dynamically.

Runic Tags: #snobol #behavioral #template-method