static Lisp simplifySNLTree(Lisp tree) { while (tree != null && tree.isA("[]") && tree.size() == 1) tree = tree.get(0); if (tree == null) ret null; Lisp lisp = new Lisp(tree.head); for (Lisp child : tree) lisp.add(simplifySNLTree(child)); ret lisp; }
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: | 1007 / 1486 |
| Referenced in: | [show references] |