The Strategy: Interchangeable Kernels
Inject arbitrary logic algorithms to morph matrix transformations.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Strategy
ARCANUM SCHOOL: Divination // Flow
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
let execute_strategy [n] (strat: i32 -> i32 -> i32) (arr1: [n]i32) (arr2: [n]i32) : [n]i32 =
map2 strat arr1 arr2
let strategy_aggressive x y = x * y
let strategy_defensive x y = x + y
Runic Tags:
#futhark
#strategy
#map2