[gambit-list] gambit's list displaying is not very pretty

Bradley Lucier lucier at math.purdue.edu
Tue Mar 27 16:23:08 EDT 2007


On Mar 27, 2007, at 4:00 PM, Aycan iRiCAN wrote:

> "dillo gimp" <dillogimp at gmail.com> writes:
>
>> (display (list (list 1 2 ) 3))
>> 123
>> how do I properly display ((1 2) 3)?
>> thanks
>
>
>> (pp (list (list 1 2 ) 3))
> ((1 2) 3)

"pp" prints to the "interaction channel" (usually the console) by  
default, not the value of (current-output-port), so you can get  
things like

> [descartes:~/Desktop] lucier% gsc
> Gambit Version 4.0 beta 20
>
> > (with-output-to-file "stuff" (lambda () (pp '(1 2))))
> (1 2)
> >

and the file named "stuff" is empty.  Use pretty-print instead.

Brad



More information about the Gambit-list mailing list