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

11
LINES

< > BotCompany Repo | #1002789 // listToSNLTree - converts a string or lisp list to a SNL representation (new version)

JavaX fragment (include)

static Lisp listToSNLTree(L list) {
  Lisp tree = lisp(snlCommaOp(l(list)));
  for (O s : list)
    if (s instanceof Lisp)
      tree.add((Lisp) s);
    else if (s instanceof S)
      tree.add(quote((S) s));
    else
      tree.add("?");
  ret tree;
}

Author comment

Began life as a copy of #1002788

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: #1002789
Snippet name: listToSNLTree - converts a string or lisp list to a SNL representation (new version)
Eternal ID of this version: #1002789/1
Text MD5: 8d30476ae444104c7eca6ba5cc91d512
Author: stefan
Category: eleu / nl
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-02-26 00:43:53
Source code size: 261 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 647 / 590
Referenced in: #1002805 - snlParseList - opposite of listToSNLTree
#1002859 - nlList - converts a string or lisp list to an NL representation
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#3000382 - Answer for ferdie (>> t = 1, f = 0)