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)

static Lisp snlQuestionMarksToBack(Lisp tree) {
  if (tree == null || tree.size() == 0) ret tree;

  if (tree.isA("<") && tree.get(0).is("?", "."))
    ret lisp("* " + tree.get(0).head,
      snlQuestionMarksToBack(tree.get(1)));

  // recurse
  Lisp lisp = new Lisp(tree.head);
  for (Lisp child : tree)
    lisp.add(snlQuestionMarksToBack(child));
  ret lisp;
}

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: 502 / 533
Referenced in: [show references]