The <exit-trap> class implements traps that are triggered upon
stack frame exit past a specified stack depth. Instances of this
class should use the #:depth option to specify the target stack
depth.
Example:
(define (trace-at-exit trap-context)
(install-trap (make <exit-trap>
#:depth (tc:depth trap-context)
#:single-shot #t
#:behaviour trace-trap)))
(This is the actual definition of the trace-at-exit behaviour.)