The Flyweight of the Ancestral Monad
Sharing pure immutable state to minimize memory usage within the Ancestral Monad.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Flyweight
ARCANUM SCHOOL: Transmutation // Ancestral Monad
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// MIRANDA PATTERN //
|| Flyweight leverages referential transparency of the Ancestral Monad.
intrinsic_state == string
extrinsic_state == num
flyweight :: intrinsic_state -> extrinsic_state -> string
flyweight intr extr = "Intrinsic: " ++ intr ++ ", Extrinsic: " ++ show extr
shared_flyweight :: extrinsic_state -> string
shared_flyweight = flyweight "SharedMonadicCore"
client_calls :: [string]
client_calls = map shared_flyweight [1, 2, 3, 4, 5]
Runic Tags:
#miranda
#structural
#flyweight
#ancestral-monad