✨ ARCANUM RUNE DIFFICULTY: Adept Structural

The Proxy of The Gate

Controlling access to a high-cost dimensional gate via an intermediary function.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Proxy
ARCANUM SCHOOL: Abjuration // Gatekeeping
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
interface GateProxy
    exposes [openGate, proxyOpenGate]
    imports []

# Expensive or secure operation
openGate : Str -> Str
openGate = \dimension ->
    "Opening dimensional gate to ${dimension}!"

# Proxy
proxyOpenGate : Str, U64 -> Result Str [Unauthorized]
proxyOpenGate = \dimension, clearanceLevel ->
    if clearanceLevel >= 5 then
        Ok (openGate dimension)
    else
        Err Unauthorized
Runic Tags: #fast-functional-wards #roc #proxy #authorization