From 9960b8e94943867cc321a5145c327188e14d4d44 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 22 Jun 2008 13:19:09 +0200 Subject: Add class MLKInterpreter. --- MLKCons.m | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'MLKCons.m') diff --git a/MLKCons.m b/MLKCons.m index 969060e..b2b3b8b 100644 --- a/MLKCons.m +++ b/MLKCons.m @@ -19,6 +19,7 @@ #import "MLKCons.h" #import "runtime-compatibility.h" +#import #import @@ -57,6 +58,20 @@ ASSIGN (_cdr, value); } +-(NSArray *)array +{ + NSMutableArray *array = [NSMutableArray array]; + id rest = self; + + while (rest) + { + [array addObject:[rest car]]; + rest = [rest cdr]; + } + + return array; +} + -(NSString *)bareDescriptionForLisp { if (!_cdr) -- cgit v1.2.3