Macro
common-lisp
step form => result
A form to be stepped and evaluated.
The values returned by form.
step evaluates a form and allows you to single-step through it. You can include a call to step inside a tricky definition to invoke the stepper every time the definition is used.step can also optionally step through macros. :help to get a list of the commands. :s nStep this form and all of its subforms (optional positive integer argument).
:stStep this form without stepping its subforms.
:suStep up out of this form without stepping its subforms.
:srReturn a value to use for this form.
:sqQuit from the current stepper level.
:redoRedo one of the previous commands.
:getGet an item from the history list and put it in a variable.
:helpList available commands.
:useReplace one form with another form in previous command and redo it.
:hisList the commands history.
:s means do:s n times. USER 12 > (step (+ 1 (* 2 3) 4)) (+ 1 (* 2 3) 4) -> :s 1 -> :s 1 (* 2 3) -> :su 6 4 -> :s 4 11 11 USER 13 > (defun foo (x y) (+ x y)) FOO USER 14 > step (foo (+ 1 1) 2) (FOO (+ 1 1) 2) -> :st (+ 1 1) -> :s 1 -> :s 1 1 -> :s 1 2 2 -> :s 2 4 4 USER 15 > :redo (STEP (FOO # 2)) (FOO (+ 1 1) 2) -> :s (+ 1 1) -> :s 1 -> :s 1 2 2 -> :s 2 (+ X Y) -> :s X -> :s 2 Y -> :s 2 4 4 4
*no-step-out* tonil. The prompt changes as shown below: USER 36 > step (cons 1 2) (CONS 1 2) -> :s 1 -> :s 1 = 1 <- :sr 3 2 -> :s 2 = 2 <- :sr 4 (CONS 1 2) = (3 . 4) <- :s (3 . 4)
*step-macros* tot. hcl:*step-compiled* tot. *print-step-level* tot.
USER 21 > (setq *print-step-level* t)
T
USER 22 > step (cons 1 2)
[1](cons 1 2) -> :s
[2] 1 -> :s 1
[2] 2 -> :s
2
(1 . 2)
(1 . 2)
car andformat. The variablehcl:*step-filter* contains a list of functions which should not be stepped. If you get deep stack overflows inside the stepper, you may need to add a function name tohcl:*step-filter*. *print-...* variables). To control the stepper printing environment independently, set the variablehcl:*step-print-env* tot. hcl:*step-print-...* are then used instead of the variables*print-...*.