!7 // by default, elements are put to front when added // (not when accessed) sclass MRUCache extends LinkedHashMap { int maxSize = 10; *() {} *(int *maxSize) {} protected bool removeEldestEntry(Map.Entry eldest) { ret size() > maxSize; } } p { MRUCache cache = new(100); L words = words2(loadSnippet(#1008407)); print(n(words, "words")); for (S word : words) cache.put(word, toInt(cache.get(word))+1); pnl(cache); }