diff options
author | Matthias Andreas Benkard <matthias@benkard.de> | 2008-06-27 14:42:33 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <matthias@benkard.de> | 2008-06-27 14:42:33 +0200 |
commit | 189d02b12aa33fc18eaff9558675d9fa9d6ba668 (patch) | |
tree | bbaa136bcb5961452e89f103fa907cff65a9863e /MLKInterpreter.m | |
parent | cb23a76bbd3b7b1ccf4a5ec8894437e449a9047d (diff) |
MLKInterpreter: Fix APPLY and %LAMBDA.
Diffstat (limited to 'MLKInterpreter.m')
-rw-r--r-- | MLKInterpreter.m | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/MLKInterpreter.m b/MLKInterpreter.m index 01a915f..7fc14d7 100644 --- a/MLKInterpreter.m +++ b/MLKInterpreter.m @@ -127,9 +127,13 @@ static MLKSymbol *_LAMBDA; inLexicalContext:context withEnvironment:lexenv]; - return [[[program cdr] car] applyToArray:(rest - ? (id)[rest array] - : (id)[NSArray array])]; + id <MLKFuncallable> function = [self eval:[[program cdr] car] + inLexicalContext:context + withEnvironment:lexenv]; + + return [function applyToArray:(rest + ? (id)[rest array] + : (id)[NSArray array])]; } else if (car == _DEFMACRO) { @@ -163,11 +167,11 @@ static MLKSymbol *_LAMBDA; // would be a lambda list in a real LAMBDA form must be a // symbol here. id lambdaList = [[program cdr] car]; - id body = [[[program cdr] cdr] cdr]; + id body = [[program cdr] cdr]; MLKInterpretedClosure *closure; closure = AUTORELEASE ([[MLKInterpretedClosure alloc] - initWithBodyForm:body + initWithBodyForms:body lambdaListName:lambdaList context:context environment:lexenv]); |