The Composite Matrix
Treating a unified cluster of spells identically to a single spell.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Composite
ARCANUM SCHOOL: Conjuration // Fractal Weaving
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
module CompositePattern where
open import Data.List
open import Data.String
data Graphic : Set where
Leaf : String → Graphic
Node : List Graphic → Graphic
render : Graphic → String
render (Leaf s) = s
render (Node []) = ""
render (Node (x ∷ xs)) = "Grouped" -- simplified for pure rune representation
The Composite Matrix
A single thread of code or a sprawling hierarchy of interlocking ICE nodes—to the execution engine, they must both respond to the same “invoke” command. The Composite Matrix allows us to weave fractals.
The Dependent Runes
Using an inductive data type, Graphic, we easily represent trees of magical effects. Pattern matching handles both individual spells and vast matrices.
Runic Tags:
#agda
#composite
#fractal