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

13
LINES

< > BotCompany Repo | #1002742 // snlQuestionMarksToBack - and other punctuation

JavaX fragment (include)

1  
static Lisp snlQuestionMarksToBack(Lisp tree) {
2  
  if (tree == null || tree.size() == 0) ret tree;
3  
4  
  if (tree.isA("<") && tree.get(0).is("?", "."))
5  
    ret lisp("* " + tree.get(0).head,
6  
      snlQuestionMarksToBack(tree.get(1)));
7  
8  
  // recurse
9  
  Lisp lisp = new Lisp(tree.head);
10  
  for (Lisp child : tree)
11  
    lisp.add(snlQuestionMarksToBack(child));
12  
  ret lisp;
13  
}

Author comment

Began life as a copy of #1002740

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: #1002742
Snippet name: snlQuestionMarksToBack - and other punctuation
Eternal ID of this version: #1002742/1
Text MD5: 0c95a4ab2d5b8ee7ba2f9603658022c1
Author: stefan
Category: eleu / nl
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-02-24 21:33:39
Source code size: 375 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 570 / 606
Referenced in: [show references]