summaryrefslogtreecommitdiff
path: root/MLKCons.m
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-06-22 13:19:09 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-06-22 13:19:09 +0200
commit9960b8e94943867cc321a5145c327188e14d4d44 (patch)
treeaca68ea0144f0cb8b3cc0b2504d04536b3fce318 /MLKCons.m
parentf096436acc4c0c6968c88ca0f795bf021c83c670 (diff)
Add class MLKInterpreter.
Diffstat (limited to 'MLKCons.m')
-rw-r--r--MLKCons.m15
1 files changed, 15 insertions, 0 deletions
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 <Foundation/NSArray.h>
#import <Foundation/NSString.h>
@@ -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)