✨ ARCANUM RUNE DIFFICULTY: Apprentice Behavioral

The Memento

Capturing the state of a fragile array ritual to allow temporal rollback.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Memento
ARCANUM SCHOOL: Chronomancy // State Preservation
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
coclass 'Ritual'
create =: 3 : 'energy =: 100'
cast =: 3 : 'energy =: energy - y'

NB. Memento generation and restoration
save_state =: 3 : 'energy'
restore_state =: 3 : 'energy =: y'

NB. Usage:
NB. r =. conew 'Ritual'
NB. memento =. save_state__r ''
NB. cast__r 50
NB. restore_state__r memento

Externalizing internal state into a snapshot value for later restoration.

Runic Tags: #memento #snapshot #temporal #chronomancy