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

9
LINES

< > BotCompany Repo | #1002849 // nlToCons

JavaX fragment (include)

static Lisp nlToCons(Lisp term) {
  if (term.isLeaf() /*|| !term.is("[]")*/)
    ret lisp("[]", "cons", term, "end");
  int n = term.size();
  Lisp x = lisp("end");
  for (int i = n-1; i >= 0; i--)
    x = lisp("[]", "cons", term.get(i), x);
  ret x;
}

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: #1002849
Snippet name: nlToCons
Eternal ID of this version: #1002849/1
Text MD5: 6cccdd6a7afe125ed553d8c7b14e37f1
Author: stefan
Category: eleu / nl
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-03-03 18:05:53
Source code size: 262 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 697 / 753
Referenced in: [show references]