public override string DisplayObject() { StringBuilder repr = new StringBuilder("("); repr.Append(DisplayValue()); CTObject tail = cdr; while (true) { if (tail.GetType() == typeof(CTPair)) { CTPair rest = (CTPair)tail; repr.Append(" ").Append(rest.DisplayValue()); tail = rest.cdr; } else { if (tail.GetType() != typeof(CTEmptyList)) { repr.Append(" . ").Append(tail.DisplayObject()); } break; } } repr.Append(")"); return(repr.ToString()); }
public string DisplayValue() { return(car.DisplayObject()); }