The Strategy of the Ancestral Monad
Passing algorithmic behavior as pure higher-order functions within the Ancestral Monad.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Strategy
ARCANUM SCHOOL: Enchantment // Ancestral Monad
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// MIRANDA PATTERN //
|| Strategy is simply function parameterization.
strategy == num -> num -> num
strat_add :: strategy
strat_add x y = x + y
strat_mul :: strategy
strat_mul x y = x * y
context_execute :: strategy -> num -> num -> num
context_execute strat a b = strat a b
compute_result :: num
compute_result = context_execute strat_mul 7 6
Runic Tags:
#miranda
#behavioral
#strategy
#ancestral-monad