User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
algorithm:factorial_recursive [2015/01/29 09:18]
will
algorithm:factorial_recursive [2015/02/02 08:28] (current)
Line 1: Line 1:
-======= ​Bubble sort ======+======= ​λ Factorial - recursive ​======
  
 <​nowiki>​ <​nowiki>​
Line 32: Line 32:
 <syntax js> <syntax js>
 { {
 +    "​title":"​Factorial - recursive",​
     "​height":"​150px"​     "​height":"​150px"​
 } }
Line 49: Line 50:
             var stack = x.stack;             var stack = x.stack;
             for (var i=stack.length-1;​ i>=0; i--) {             for (var i=stack.length-1;​ i>=0; i--) {
-                var x2 = stack[i].executionContext;​ +                var = stack[i].lookupInScope("​x"​);​
-                var a = x2.lookupInScope("​x"​);​+
                 if (a) {                 if (a) {
                     html = a+" * "​+html;​                     html = a+" * "​+html;​
algorithm/factorial_recursive.1422551890.txt.gz · Last modified: 2015/02/02 08:23 (external edit)