From 9093646dcd116415f629b87086d915dc64ced261 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 27 Jul 2008 10:04:09 +0200 Subject: MLKCons: Print NIL as (). --- MLKCons.m | 4 ++-- 1 file 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]]; } -- cgit v1.2.3