summaryrefslogtreecommitdiff
path: root/MLKInterpreter.m
diff options
context:
space:
mode:
authorMatthias Benkard <mulk@minimulk.mst-plus>2008-10-02 16:36:14 +0200
committerMatthias Benkard <mulk@minimulk.mst-plus>2008-10-02 16:36:14 +0200
commit2009d6d234c6bdc871109cf6b35c3ac2070f8d11 (patch)
treed4b1a557a58b2cafdc70d00782af48ead415c195 /MLKInterpreter.m
parent9fef4e8498255fb72f654514321ffc1e8ca382b6 (diff)
Interpreter: Implement MULTIPLE-VALUE-LIST instead of MULTIPLE-VALUE-CALL.
Diffstat (limited to 'MLKInterpreter.m')
-rw-r--r--MLKInterpreter.m15
1 files changed, 3 insertions, 12 deletions
diff --git a/MLKInterpreter.m b/MLKInterpreter.m
index 027e2f7..e7e95ba 100644
--- a/MLKInterpreter.m
+++ b/MLKInterpreter.m
@@ -473,20 +473,11 @@ PRIMARY (NSArray *array)
@end
-@implementation MLKMultipleValueCallForm (MLKInterpretation)
+@implementation MLKMultipleValueListForm (MLKInterpretation)
-(NSArray *) reallyInterpretWithEnvironment:(MLKLexicalEnvironment *)env
{
- NSMutableArray *results = [NSMutableArray array];
- int i;
- id <MLKFuncallable> function = PRIMARY ([_functionForm interpretWithEnvironment:env]);
-
- for (i = 0; i < [_bodyForms count]; i++)
- {
- NSArray *values = [[_bodyForms objectAtIndex:i] interpretWithEnvironment:env];
- [results addObjectsFromArray:values];
- }
-
- return [function applyToArray:results];
+ NSArray *results = [_listForm interpretWithEnvironment:env];
+ return [NSArray arrayWithObject:[MLKCons listWithArray:results]];
}
@end