Design-Patterns icon indicating copy to clipboard operation
Design-Patterns copied to clipboard

Added Memento pattern

Open Cotel opened this issue 7 years ago • 0 comments

Close #20

I think this pattern has no sense in Kotlin. We could join Originator and Memento and we could make CareTaker dissappear because it is only a wrapper of a List of Mementos. Memento has a immutable state and if you want to modify it's state you would create a new Memento with another state and store them in a List in case you want to get back to some of them.

What do you think?

Cotel avatar Apr 24 '17 14:04 Cotel