The Proxy of Web Runes
Provide a magical ward or placeholder for a deeply hidden web rune.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Proxy
ARCANUM SCHOOL: Abjuration // Ward Enforcement
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// PURESCRIPT PATTERN //
module Arcane.Proxy where
import Prelude
import Effect (Effect)
import Effect.Console (log)
type ForbiddenLibrary = { accessTome :: String -> Effect Unit }
realLibrary :: ForbiddenLibrary
realLibrary = { accessTome: \tome -> log $ "Reading true secrets of: " <> tome }
-- Security Proxy
proxyLibrary :: String -> ForbiddenLibrary
proxyLibrary password =
{ accessTome: \tome ->
if password == "Shibboleth"
then realLibrary.accessTome tome
else log "Access Denied by the Astral Ward."
}
Runic Tags:
#structural
#proxy
#purescript
#runes