summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-07-27 11:13:20 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-07-27 11:13:20 +0200
commit85ee881e611058e41e7dd7bc9cacfb7933f6778b (patch)
tree7cd48fe7a0d809bd4a7f4d767e9089ba92dc4db1
parent47d502e02b4dc42d8192102c4e52764da09a90e5 (diff)
MLKCons: Fix NIL printing for list tails.
-rw-r--r--MLKCons.m3
1 files changed, 2 insertions, 1 deletions
diff --git a/MLKCons.m b/MLKCons.m
index 7ed6d1c..6b6cc8b 100644
--- a/MLKCons.m
+++ b/MLKCons.m
@@ -100,7 +100,8 @@
-(NSString *)bareDescriptionForLisp
{
if (!_cdr)
- return [NSString stringWithFormat:@"%@", [_car descriptionForLisp]];
+ return [NSString stringWithFormat:@"%@",
+ (_car ? (id)[_car descriptionForLisp] : (id)@"()")];
else if ([_cdr isKindOfClass:[MLKCons class]])
return [NSString stringWithFormat:@"%@ %@",
(_car ? (id)[_car descriptionForLisp] : (id)@"()"),