Libraryless. Click here for Pure Java version (2242L/14K).
1 | static LLS unifyStringsInTokenizations(Iterable<LS> toks) {
|
2 | new HashMap<S> map; |
3 | ret levelTwoMap(toks, func(S s) -> S {
|
4 | S x = map.get(s); |
5 | if (x != null) ret x; |
6 | map.put(s, s); |
7 | ret s; |
8 | }); |
9 | } |
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1025704 |
| Snippet name: | unifyStringsInTokenizations - save some space in a list of tokenizations |
| Eternal ID of this version: | #1025704/1 |
| Text MD5: | 5977620ff0c1786156035aeb1a718ebc |
| Transpilation MD5: | 31e011217f8f8ab394fee5f80f740f1a |
| Author: | stefan |
| Category: | javax / agi.blue |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-10-14 00:31:36 |
| Source code size: | 216 bytes / 9 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 432 / 560 |
| Referenced in: | [show references] |