✨ ARCANUM RUNE DIFFICULTY: Adept Structural

The Facade Grimoire

Provides a simplified interface to a complex system of interconnected mystical subsystems.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Facade
ARCANUM SCHOOL: Divination // Clarity
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
effect leylines { fun tap() : int }
effect astromancy { fun read-stars() : string }

fun cosmos-facade(action: () -> <leylines,astromancy|e> a) : e a
  with handler
    fun tap() 500
  with handler
    fun read-stars() "The stars align"
  action()

effect grand-ritual
  fun perform() : string

fun ritual-facade(action: () -> <grand-ritual|e> a) : e a
  with cosmos-facade
  with fun perform() read-stars() ++ " and power flows: " ++ tap().show
  action()

pub fun main()
  with ritual-facade
  println(perform())
Runic Tags: #koka #facade #structural