🕰️ SIMULA GENESIS DIFFICULTY: Apprentice Behavioral

The Iterator Incantation in Simula

Sequentially traversing a collection of esoteric relics.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Iterator
ARCANUM SCHOOL: Divination // Traversal
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// SIMULA PATTERN //
Begin
    Class Iterator;
    Virtual: Ref(Item) Procedure Next;
    Virtual: Boolean Procedure IsDone;
    Begin
    End;

    Class Aggregate;
    Virtual: Ref(Iterator) Procedure CreateIterator;
    Begin
    End;
End;

To observe a grimoire’s pages without unbinding its spine, one uses an Iterator. It reveals the elements of an aggregate sequentially, keeping the internal structure cloaked in secrecy.

Runic Tags: #simula #gof #behavioral #traversal