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

9
LINES

< > BotCompany Repo | #1002713 // simplifySNLTree

JavaX fragment (include)

1  
static Lisp simplifySNLTree(Lisp tree) {
2  
  while (tree != null && tree.isA("[]") && tree.size() == 1)
3  
    tree = tree.get(0);
4  
  if (tree == null) ret null;
5  
  Lisp lisp = new Lisp(tree.head);
6  
  for (Lisp child : tree)
7  
    lisp.add(simplifySNLTree(child));
8  
  ret lisp;
9  
}

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: #1002713
Snippet name: simplifySNLTree
Eternal ID of this version: #1002713/1
Text MD5: 7fadd63a1ac0de8cbecea4345930d394
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-02-16 03:40:14
Source code size: 276 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 738 / 1232
Referenced in: [show references]