Comparing version
@@ -21,2 +21,3 @@ { | ||
"printf", | ||
"retval", | ||
"selftest", | ||
@@ -23,0 +24,0 @@ "stambda", |
@@ -32,6 +32,8 @@ | ||
link(proto, ['generic', '$'], function () { | ||
return this.code instanceof Tuple$ ? null // only for generic functions. | ||
: safelyAssign($Object.empty(), | ||
typeof this.bound === 'function' ? this.bound : this | ||
) | ||
return this['--generic'] || ( | ||
this.code instanceof Tuple$ ? null // only for generic functions. | ||
: (this['--generic'] = safelyAssign($Object.empty(), | ||
typeof this.bound === 'function' ? this.bound : this | ||
)) | ||
) | ||
}) | ||
@@ -38,0 +40,0 @@ |
@@ -14,4 +14,5 @@ 'use strict' | ||
var constambda = $void.constambda | ||
var evaluate = $void.evaluate | ||
var evaluate_ = $void.evaluate | ||
var function_ = $void.function | ||
var ownsProperty = $void.ownsProperty | ||
var createLambdaSpace = $void.createLambdaSpace | ||
@@ -25,2 +26,7 @@ var createFunctionSpace = $void.createFunctionSpace | ||
function evaluate (tbody, scope) { | ||
var retval = evaluate_(tbody, scope) | ||
return ownsProperty(scope.context, 'retval') ? scope.context.retval : retval | ||
} | ||
$void.lambdaOf = function lambdaOf (space, clause, offset) { | ||
@@ -108,4 +114,7 @@ // compile code | ||
if (key) { | ||
scope.local[key] = key === 'this' ? this | ||
: arguments.length > 0 ? arguments[0] : null | ||
key === 'this' | ||
? (scope.context.this = this) | ||
: (scope.local[key] = | ||
typeof arguments[0] === 'undefined' ? null : arguments[0] | ||
) | ||
} | ||
@@ -128,4 +137,3 @@ // execution | ||
if (key === 'this') { | ||
// this is only a fake parameter to indicate accepting a this. | ||
return alignWithGeneric($stambda, 0) | ||
return $stambda | ||
} | ||
@@ -132,0 +140,0 @@ $stambda = $stambda.bind(null) |
{ | ||
"name": "eslang", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"author": { | ||
@@ -5,0 +5,0 @@ "email": "leevi@nirlstudio.com", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1331233
0.39%11439
0.09%