λ HASKELL SIGILS DIFFICULTY: Adept Structural

The Composite

Fractal ward structures represented by algebraic data types.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Composite
ARCANUM SCHOOL: Illusion // Fractal
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// PURE FUNCTIONAL VOID SIGIL //
module Composite where
data Graphic = Leaf String | Node [Graphic]
draw :: Graphic -> String
draw (Leaf s) = s
draw (Node xs) = concatMap draw xs
Runic Tags: #composite #adt #structural