extend IDictionary def lastValue as TV keys = List(.keys) keys.sort return this[keys[keys.count-1]] class P def main is shared d = { 'a': 1, 'b': 2, 'z': 3, 'c': 4, 'd': 5, } assert d.lastValue == 3