diff options
Diffstat (limited to 'MLKCons.m')
-rw-r--r-- | MLKCons.m | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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) |