correctly print [] functors
@@ -1358,7 +1358,7 @@ fn handle_heap_term(
read_heap_cell!(addr,
(HeapCellValueTag::Atom, (name, arity)) => {
- if name == atom!("[]") {
+ if name == atom!("[]") && arity == 0 {
if !self.at_cdr("") {
append_str!(self, "[]");
}
