Data update

This commit is contained in:
Ingy döt Net 2026-04-30 12:34:36 -04:00
parent 4bb20c9b71
commit cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions

View file

@ -1,36 +1,36 @@
import ceylon.collection {
ArrayList,
HashMap,
naturalOrderTreeMap
ArrayList,
HashMap,
naturalOrderTreeMap
}
shared void run() {
// the easiest way is to use the map function to create
// an immutable map
value myMap = map {
"foo" -> 5,
"bar" -> 10,
"baz" -> 15,
"foo" -> 6 // by default the first "foo" will remain
};
// or you can use the HashMap constructor to create
// a mutable one
value myOtherMap = HashMap {
"foo"->"bar"
};
myOtherMap.put("baz", "baxx");
// there's also a sorted red/black tree map
value myTreeMap = naturalOrderTreeMap {
1 -> "won",
2 -> "too",
4 -> "fore"
};
for(num->homophone in myTreeMap) {
print("``num`` is ``homophone``");
}
// the easiest way is to use the map function to create
// an immutable map
value myMap = map {
"foo" -> 5,
"bar" -> 10,
"baz" -> 15,
"foo" -> 6 // by default the first "foo" will remain
};
// or you can use the HashMap constructor to create
// a mutable one
value myOtherMap = HashMap {
"foo"->"bar"
};
myOtherMap.put("baz", "baxx");
// there's also a sorted red/black tree map
value myTreeMap = naturalOrderTreeMap {
1 -> "won",
2 -> "too",
4 -> "fore"
};
for(num->homophone in myTreeMap) {
print("``num`` is ``homophone``");
}
}