From bdfe4801295945b92f84b8c03cb2e0be485ae4f0 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Mon, 18 Aug 2008 01:19:06 +0200 Subject: Promote special operator APPLY to an intrinsic function. --- MLKInterpreter.m | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) (limited to 'MLKInterpreter.m') diff --git a/MLKInterpreter.m b/MLKInterpreter.m index 540b9b5..0cdf904 100644 --- a/MLKInterpreter.m +++ b/MLKInterpreter.m @@ -193,34 +193,7 @@ } } - if (car == APPLY) - { - MLKCons *rest = denullify([[self eval:[[[program cdr] cdr] car] - inLexicalContext:context - withEnvironment:lexenv - expandOnly:expandOnly] - objectAtIndex:0]); - - id function = denullify([[self eval:[[program cdr] car] - inLexicalContext:context - withEnvironment:lexenv - expandOnly:expandOnly] - objectAtIndex:0]); - - if (expandOnly) - RETURN_VALUE ([MLKCons cons:APPLY - with:[MLKCons cons:function - with:[MLKCons cons:rest - with:nil]]]); - - if ([function isKindOfClass:[MLKSymbol class]]) - function = [lexenv functionForSymbol:function]; - - return [function applyToArray:(rest - ? (id)[rest array] - : (id)[NSArray array])]; - } - else if (car == CATCH) + if (car == CATCH) { id catchTag; NSArray *values; -- cgit v1.2.3