The Command of the Hive Switchboard
Encapsulating arcane rituals as pure messages.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Command
ARCANUM SCHOOL: Enchantment // Seals
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// ERLANG PATTERN //
-module(the_command).
-export([execute/1]).
%% A command is a fun() or a tuple {M, F, A}
execute(CommandFun) when is_function(CommandFun) ->
CommandFun();
execute({M, F, A}) ->
apply(M, F, A).
The Command
Spells stored in crystal. A closure or MFA tuple is passed through the Switchboard, ready to unleash its stored power at a moment’s notice.
Runic Tags:
#erlang
#actors
#telepathy
#switchboard
#command