Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

28
LINES

< > BotCompany Repo | #1009972 // web_labelsToUpperCase - changes original web

JavaX fragment (include)

1  
sbool web_labelsToUpperCase_debug;
2  
3  
static Web web_labelsToUpperCase(Web web) {
4  
  for (WebNode node : web.nodes) {
5  
    if (web_labelsToUpperCase_debug)
6  
      print("Node to upper: " + struct(node.labels));
7  
    web_labelsToUpperCase_noindex(node);
8  
    if (web_labelsToUpperCase_debug)
9  
      print("Node to upper done: " + struct(node.labels));
10  
  }
11  
  web_reindex(web);
12  
  web.labelsToUpper = true;
13  
  ret web;
14  
}
15  
16  
static void web_labelsToUpperCase_noindex(WebNode node) {
17  
  node.labels = map(f web_labelsToUpperCase_x, node.labels);
18  
}
19  
20  
static void web_labelsToUpperCase(WebNode node) {
21  
  web_deindex(node);
22  
  web_labelsToUpperCase_noindex(node);
23  
  web_index(node);
24  
}
25  
26  
static Lisp web_labelsToUpperCase_x(Lisp l) {
27  
  ret nempty(l.args) ? l : lisp(toUpperCase(l.head));
28  
}

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: #1009972
Snippet name: web_labelsToUpperCase - changes original web
Eternal ID of this version: #1009972/8
Text MD5: 99901febbbb41a228f55c97247122854
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-09-02 01:29:36
Source code size: 791 bytes / 28 lines
Pitched / IR pitched: No / No
Views / Downloads: 499 / 524
Version history: 7 change(s)
Referenced in: [show references]