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

13
LINES

< > BotCompany Repo | #1008805 // xtok_recurse_limited_debug

JavaX fragment (include)

// f : L -> L
static L xtok_recurse_limited_debug(O f, L l, int limit) {
  print("xtok_recurse " + f + " limit " + limit + " on " + struct(l));
  l = (L) callF(f, l);
  print("xtok_recurse now: " + struct(l));
  if (limit <= 1) ret l;
  for (int i = 1; i < l(l); i += 2) {
    O o = l.get(i);
    if (o instanceof L)
      l.set(i, xtok_recurse_limited_debug(f, (L) o, limit-1));
  }
  ret l;
}

Author comment

Began life as a copy of #1008804

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: #1008805
Snippet name: xtok_recurse_limited_debug
Eternal ID of this version: #1008805/3
Text MD5: ff75fbfd08abd06cd51349f8c909c356
Author: stefan
Category: javax / parsing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-06-09 02:21:14
Source code size: 406 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 403 / 444
Version history: 2 change(s)
Referenced in: [show references]