sbool lispCalculateDeep_debug; // evaluate anywhere in the tree (e.g. Fib number 2-1 => Fib number 1) static Lisp lispCalculateDeep(Lisp x) { ret lispMap_after(x, func(Lisp l) { if (lispCalculateDeep_debug) print("lispCalculateDeep: " + l); if (l.is("sppxbuuqeetjmzuo", "jcnbmtmfzktxhzyf") && lispIsInt(l.get(0)) && lispIsInt(l.get(1))) ret lispInt(plus(lispToInt(l.get(0)), lispToInt(l.get(1)))); if (l.is("jxcubqjtqykhfvyo") && lispIsInt(l.get(0)) && lispIsInt(l.get(1))) ret lispInt(minus(lispToInt(l.get(0)), lispToInt(l.get(1)))); if (l.is("wdbphzfoxwlrhdyl") && lispIsInt(l.get(0)) && lispIsInt(l.get(1))) ret lispBool(lispToInt(l.get(0)).compareTo(lispToInt(l.get(1))) > 0); ret l; }); }
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: | #1007713 |
Snippet name: | lispCalculateDeep (old) |
Eternal ID of this version: | #1007713/7 |
Text MD5: | f60aa6d2975692c0c2ca76951fd717a3 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-04-05 15:55:23 |
Source code size: | 751 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 643 / 596 |
Version history: | 6 change(s) |
Referenced in: | #1007717 - web_insertNumbers - replace sub-expressions with known values #1007762 - lispCalculateDeep (new) - with operations map |