The Decorator
Function composition layering magical effects infinitely.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Decorator
ARCANUM SCHOOL: Enchantment // Composition
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// PURE FUNCTIONAL VOID SIGIL //
module Decorator where
type Spell = String -> String
fireEnchant :: Spell
fireEnchant s = s ++ " with Fire"
frostEnchant :: Spell
frostEnchant s = s ++ " with Frost"
combinedSpell = fireEnchant . frostEnchant
Runic Tags:
#decorator
#composition
#functional