Quick example:
extend Dictionary<of TKey, TValue>
def lastValue as TValue
keys = List<of TKey>(.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
You can browse the test cases in your local workspace or online at http://cobra-language.com/trac/cobra/browser/cobra/trunk/Tests/420-extensions/400-extend-generics.
This feature will enable us to add convenience methods to IList, IDictionary, etc.
If you find any problems, please report them here.