Sync
This commit is contained in:
parent
6f050a029e
commit
776bba907c
3887 changed files with 59894 additions and 7280 deletions
|
|
@ -1,8 +1,15 @@
|
|||
function A(k, x1, x2, x3, x4, x5) {
|
||||
function B() A(--k, B, x1, x2, x3, x4);
|
||||
return k <= 0 ? x4() + x5() : B();
|
||||
function a(k, x1, x2, x3, x4, x5) {
|
||||
function b() {
|
||||
k = k - 1;
|
||||
return a(k, b, x1, x2, x3, x4);
|
||||
}
|
||||
return k <= 0 ? x4() + x5() : b();
|
||||
}
|
||||
|
||||
function K(n) function() n;
|
||||
|
||||
alert(A(10, K(1), K(-1), K(-1), K(1), K(0)));
|
||||
// this uses lambda wrappers around the numeric arguments
|
||||
function x(n) {
|
||||
return function () {
|
||||
return n;
|
||||
};
|
||||
}
|
||||
alert(a(10, x(1), x(-1), x(-1), x(1), x(0)));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue