🌐 REASONML PACT DIFFICULTY: Apprentice Structural

Facade in ReasonML

A clean module hiding a complex JS undercity.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Facade
ARCANUM SCHOOL: Illusion // Glamour
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// REASON PATTERN //
module SubsystemA = { let run = () => "SysA"; };
module SubsystemB = { let run = () => "SysB"; };

module SystemFacade = {
  let initialize = () => SubsystemA.run() ++ " & " ++ SubsystemB.run();
};

The Facade provides a single module entrypoint to a tangled web of underlying arcane subsystems.

Runic Tags: #reason #facade #structural