Add new modules to standard library

This commit is contained in:
2020-03-13 17:28:02 +01:00
parent 264100eef1
commit 5680ed4e42
17 changed files with 321 additions and 4 deletions

View File

@@ -0,0 +1,21 @@
extend map as this {
function containsKey(key) {
return this.keys.contains(key);
}
function containsValue(value) {
return this.values.contains(value);
}
function contains(key, value) {
return (this as (v, k) ^ v % (k == key) and (v == value)).size > 0;
}
function isEmpty() {
return this.size == 0;
}
function isNotEmpty() {
return not this.isEmpty();
}
}