Mem:
Filter:
adclib/Classes (extension) | Control

Mem
ExtensionExtension

Avoid repetitions of recent items

Description

Mem keeps a list of recent items (or keys), so one can avoid close repetitions of items with random choices.

First code examples:

Class Methods

.minSize

the default minimum number of choices remaining open

.new

make a new mem

Arguments:

maxMems

maximum number of remembered items/keys

Instance Methods

.filter

filter a list of items, keeping a minimum of choices open

.filterDict

filter a dict by keys, keeping a minimum of choices open

.used

the recently used items/keys

.add

add an item/key to the used list

.maxMems

get and set the number of keys to remember