☎️ ERLANG HIVE DIFFICULTY: Adept Behavioral

The Chain of Responsibility of the Hive Switchboard

Cascading messages through linked spirits.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Chain of Responsibility
ARCANUM SCHOOL: Evocation // Cascades
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// ERLANG PATTERN //
-module(the_chain).
-export([build_chain/1, handle/2]).

build_chain(Handlers) -> Handlers.

handle([], _Msg) -> unhandled;
handle([Handler|Rest], Msg) ->
    case Handler(Msg) of
        pass -> handle(Rest, Msg);
        Result -> Result
    end.

The Chain of Responsibility

A telepathic cascade: each entity inspects the psychic wave. If they cannot decipher it, it passes to the next node in the link.

Runic Tags: #erlang #actors #telepathy #switchboard #chain-of-responsibility