✨ ARCANUM RUNE DIFFICULTY: Apprentice Structural

The Decorator: Functional Resonance

Layer computations without state mutation via higher-order functions.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Decorator
ARCANUM SCHOOL: Abjuration // Geometry
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
let with_resonance (f: i32 -> i32) (x: i32) : i32 =
  let result = f x
  in result + (result % 7)
  
let core_spell (x: i32) = x * 3

let decorated_spell = with_resonance core_spell
Runic Tags: #futhark #decorator #functions