Discussion of Common Lisp
- Posts: 35
- Joined: Sun Nov 21, 2010 2:13 pm
With LispWorks Windows. What am I doing wrong?
- Posts: 148
- Joined: Wed Jul 30, 2008 11:26 pm
I think (1 2 (4 5) 3) is prettier than the other. If you want another behaviour, you could write your own printing routine.
- Posts: 447
- Joined: Sat Jun 28, 2008 7:49 am
- Location: Austin, TX
To follow-up on Paul's post, most pretty printers won't start to indent things until such time as the data gets close to a line length. If it all fits on a single line, per Paul's comment, it's pretty by definition. If you're looking for specific indentation behavior, you might have to write things yourself. Also, sometimes versions of pprint have options that might be able to control the output better.