From 2009d6d234c6bdc871109cf6b35c3ac2070f8d11 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Thu, 2 Oct 2008 16:36:14 +0200 Subject: Interpreter: Implement MULTIPLE-VALUE-LIST instead of MULTIPLE-VALUE-CALL. --- MLKInterpreter.m | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'MLKInterpreter.m') 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 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 -- cgit v1.2.3