Hi all: I'm trying to trigger an action at script exit, similar to Perl's "END {...}" construct.
After a little searching I've stumbled across "add-hook! exit-hook ...", but for the life of me I can't seem to get it to do what I want. Here's a taste of what I'm looking for: (define foo (lambda () (display "foo") (newline))) (add-hook! exit-hook foo) (run-hook exit-hook) I'd like something like this, that doesn't need the explicit "run-hook" at the end. Ideas? Thanks, JT