✨ ARCANUM RUNE DIFFICULTY: Apprentice Behavioral

The Iterator of Grimoires

Sequentially traversing through arcane pages utilizing Roc's list processing.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Iterator
ARCANUM SCHOOL: Divination // Bibliomancy
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
interface GrimoireIterator
    exposes [Page, readGrimoire]
    imports []

Page : { number : U64, spell : Str }

# In Roc, iteration is typically handled via List.walk or List.map
readGrimoire : List Page -> List Str
readGrimoire = \pages ->
    List.map pages \page ->
        "Reading page ${Num.toStr page.number}: ${page.spell}"
Runic Tags: #fast-functional-wards #roc #iterator #traversal