summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-07-27 10:04:09 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-07-27 10:04:09 +0200
commit9093646dcd116415f629b87086d915dc64ced261 (patch)
tree61f9950d3f528eaa9ecd726e3a2ac6a5da30831b
parent27d7acc38828db3d8e8622dd1402504d7f727ed6 (diff)
MLKCons: Print NIL as ().
-rw-r--r--MLKCons.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/MLKCons.m b/MLKCons.m
index c557dc2..7ed6d1c 100644
--- a/MLKCons.m
+++ b/MLKCons.m
@@ -103,11 +103,11 @@
return [NSString stringWithFormat:@"%@", [_car descriptionForLisp]];
else if ([_cdr isKindOfClass:[MLKCons class]])
return [NSString stringWithFormat:@"%@ %@",
- [_car descriptionForLisp],
+ (_car ? (id)[_car descriptionForLisp] : (id)@"()"),
[_cdr bareDescriptionForLisp]];
else
return [NSString stringWithFormat:@"%@ . %@",
- [_car descriptionForLisp],
+ (_car ? (id)[_car descriptionForLisp] : (id)@"()"),
[_cdr descriptionForLisp]];
}