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: | 920 / 979 |
| Referenced in: | #1002876 - nlFromCons #1006654 - Standard functions list 2 (LIVE, continuation of #761) #3000382 - Answer for ferdie (>> t = 1, f = 0) #3000383 - Answer for funkoverflow (>> t=1, f=0 okay) |