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

7
LINES

< > BotCompany Repo | #1002788 // listToSNLTree - converts e.g. a token list to a SNL representation (quoted elements)

JavaX fragment (include)

static Lisp listToSNLTree(L<S> list) {
  if (empty(list)) ret lisp("emptylist");
  Lisp tree = lisp(quote(last(list)));
  for (int i = l(list)-2; i >= 0; i--)
    tree = lisp("<", lisp(quote(list.get(i))), tree);
  ret tree;
}

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: #1002788
Snippet name: listToSNLTree - converts e.g. a token list to a SNL representation (quoted elements)
Eternal ID of this version: #1002788/1
Text MD5: 4d31954bd8b5a697deff36340f449db2
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:35:04
Source code size: 232 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 549 / 472
Referenced in: [show references]