1 | static Cache<SS> cityToCountry_data = new Cache(func { |
2 | L<SS> l = worldCitiesList(); |
3 | new SS data; |
4 | for (SS line : l) |
5 | putIfNotThere(data, toLower(line.get("name")), line.get("country")); |
6 | |
7 | // hotfix |
8 | data.put("london", "United Kingdom"); |
9 | ret data; |
10 | }); |
11 | |
12 | static S cityToCountry(S city) { |
13 | ret cityToCountry_data->get(toLower(city)); |
14 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1008398 |
Snippet name: | cityToCountry |
Eternal ID of this version: | #1008398/5 |
Text MD5: | 0831f7f6cfb165167c1b543c62a73e97 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-06-01 17:04:33 |
Source code size: | 361 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 524 / 556 |
Version history: | 4 change(s) |
Referenced in: | [show references] |