❄️ SNOBOL HEX DIFFICULTY: Apprentice Creational

The Builder of Snobol

Stitching together ancient syllables to construct a complex artifact.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Builder
ARCANUM SCHOOL: Conjuration // Golemancy
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// SNOBOL PATTERN //
        * Builder pattern using string concatenation and replacement
        DEFINE('BUILD_GOLEM()')
        DEFINE('ADD_ARM(G)')
        DEFINE('ADD_HEAD(G)')

        GOLEM = BUILD_GOLEM()
        GOLEM = ADD_ARM(GOLEM)
        GOLEM = ADD_HEAD(GOLEM)
        OUTPUT = GOLEM
        :(END)

BUILD_GOLEM
        BUILD_GOLEM = 'Clay Body' :(RETURN)

ADD_ARM
        ADD_ARM = G ', Stone Arm' :(RETURN)

ADD_HEAD
        ADD_HEAD = G ', Iron Head' :(RETURN)
END

The Builder pattern in SNOBOL is achieved through successive string concatenations and substitutions. The golem is built piece by piece, as each incantation adds another structural component to the text representation.

Runic Tags: #snobol #strings #creational #builder