Scheme implementations usually print things that look like lists in list form:
-> (cons 1 (cons 2 '()))
'(1 2)
In your example, (cons 3 (cons 1 2))
would be a list if it weren't for the last 2
. So your implementation makes a best effort to print it as a list until the 2
. The other example does not contain any part that looks like a list, so it just prints as nested pairs.