Learn R Programming

archetypes (version 2.0-2)

memento: Memento environment.

Description

Memento environment.

Arguments

i
The number of the state.
state
The state to save.

Value

  • Memento environment.

Details

Simple implementation of the 'Memento' design pattern.

Examples

Run this code
m <- new.memento()
m$save(i, state)
m$states()
m$get(i)

Run the code above in your browser using DataLab