The Iterator
Provide a way to access the elements of an aggregate mainframe structure sequentially without exposing its underlying representation.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Iterator
ARCANUM SCHOOL: Divination // Traversal
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// PLI PATTERN //
/* The Iterator */
ITERATOR: PROC OPTIONS(MAIN);
DCL 1 ITER BASED(I_PTR),
2 HAS_NEXT ENTRY RETURNS(BIT(1)),
2 GET_NEXT ENTRY RETURNS(POINTER);
PUT SKIP LIST('Sequentially reading tape records...');
END ITERATOR;
The Iterator obscures the complexities of tape reading and array index tracking, exposing only simple fetch functions.
Runic Tags:
#iterator
#sequential
#tape