Add a comment to the Pair Display TODO
This commit is contained in:
parent
4274822b65
commit
25c24852cd
1 changed files with 1 additions and 0 deletions
|
@ -73,6 +73,7 @@ impl fmt::Display for Object {
|
|||
Object::Pair(ref car, ref cdr) => {
|
||||
// TODO: There are rules for printing pairs...
|
||||
// Print a dot before the cdr iff it's anything but Null or another Pair.
|
||||
// Going to need a recursive helper to avoid printing ( and ) for every pair.
|
||||
write!(f, "({}", car).and_then(|_| match cdr {
|
||||
&ObjectPtr::Null => write!(f, ")"),
|
||||
&ObjectPtr::Ptr(ref ptr) => match ptr.deref() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue