5.21.3.5 Tracing Examples

The following examples show what tracing is and the kind of output that
it generates. In the first example, we define a recursive function for
reversing a list, then watch the effect of the recursive calls by
tracing each call and return value.

The number before the colon in this output (which follows (ice-9
debugging trace)'s default output format) is the number of real frames
on the stack. The fact that this number increases for each recursive
call confirms that the implementation above of rev is not
tail-recursive.

In the next example, we probe the internal workings of
rev in more detail by using the trace-until-exit
behaviour.