chickadee » s9fes-char-graphics » draw-tree

draw-tree ROOT #!optional MAX-WIDTHprocedure

Draws a character graphic representation of the tree LIST on (current-output-port).

ROOT
pair ; tree root node.
MAX-WIDTH
fixnum ; maximum printed node width, in characters. default is 7.
(draw-tree '((a) (b . c) (d e)))
=>
[o|o]---[o|o]---[o|/]
  |       |       |
[o|/]     |     [o|o]---[o|/]
  |       |       |       |
  a       |       d       e
          |
        [o|o]---  c
          |
          b