The Template Method
Outlining the grand ritual while letting apprentices fill in the details.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Template Method
ARCANUM SCHOOL: Evocation // Ritualism
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// SCHEME PATTERN //
(define (perform-ritual preparation-fn invocation-fn)
(display "Cleansing the circle...\n")
(preparation-fn)
(display "Chanting the ancient words...\n")
(invocation-fn)
(display "The ritual is complete.\n"))
(define (fire-ritual)
(perform-ritual
(lambda () (display "Lighting candles.\n"))
(lambda () (display "Calling the flame.\n"))))
The core ritual structure remains immutable, while specific conjuration steps are injected as anonymous closures by the caster.
Runic Tags:
#behavioral
#scheme
#higher-order-functions
#skeleton