The Builder
Construct complex magical wards step-by-step using pure content-addressed transformations.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Builder
ARCANUM SCHOOL: Abjuration // Ward Crafting
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
structural type Ward = Ward Nat Text Boolean
structural type WardBuilder = WardBuilder (Optional Nat) (Optional Text) Boolean
WardBuilder.empty : WardBuilder
WardBuilder.empty = WardBuilder None None false
WardBuilder.withPower : Nat -> WardBuilder -> WardBuilder
WardBuilder.withPower p b = match b with
WardBuilder _ t s -> WardBuilder (Some p) t s
WardBuilder.withSigil : Text -> WardBuilder -> WardBuilder
WardBuilder.withSigil t b = match b with
WardBuilder p _ s -> WardBuilder p (Some t) s
WardBuilder.seal : WardBuilder -> WardBuilder
WardBuilder.seal b = match b with
WardBuilder p t _ -> WardBuilder p t true
WardBuilder.build : WardBuilder -> Optional Ward
WardBuilder.build b = match b with
WardBuilder (Some p) (Some t) sealed -> Some (Ward p t sealed)
_ -> None
Constructing complex ethereal forms requires precision. The Builder pattern in Unison relies on immutable state transitions, refining the raw magical components into a perfected entity. Each step creates a new content-addressed state, preventing temporal paradoxes.
Runic Tags:
#creational
#builder
#unison
#immutable