✨ ARCANUM RUNE DIFFICULTY: Apprentice Creational

The Builder Hex

Step-by-step construction of complex derivation rituals.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Builder
ARCANUM SCHOOL: Conjuration // Pure Environment Hexes
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
let
  # The Builder constructs complex enchantments step-by-step
  spellBuilder = initialAttrs: {
    addMaterial = material: spellBuilder (initialAttrs // { materials = initialAttrs.materials ++ [ material ]; });
    addIncantation = word: spellBuilder (initialAttrs // { words = initialAttrs.words ++ [ word ]; });
    build = initialAttrs;
  };

  emptySpell = { materials = []; words = []; };
  
  # Director
  fireballBuilder = spellBuilder emptySpell;
  
  fireballSpell = fireballBuilder
    .addMaterial "Bat Guano"
    .addMaterial "Sulfur"
    .addIncantation "Ignis!"
    .build;
in
  fireballSpell

Through pure functional updates, the Builder Hex accumulates state across sequential applications. In the realm of Nix, this is often seen in overrideAttrs chains or module systems, allowing deep customization of derivations before their final evaluation.

Runic Tags: #creational #builder #nix #pipelines