On Thursday 15 January 2004 10:39, Martin ``rydis'' Rydstr|m wrote:
> On Thu, Jan 15, 2004 at 10:01:13AM +0100, [EMAIL PROTECTED] wrote:
> > you can step each form ? can you give me a simple example ?
>
> * (step ((lambda (a) (princ a) (incf a) (princ a) a) 17))
> ; Compiling LAMBDA NIL:
> ; Compiling Top-Level Form:
>
>
> Stepping the form
>   ((LAMBDA (A) (PRINC A) (INCF A) (PRINC A) ...) 17)
> using the debugger.  Type HELP for help.
>
>
> *Step*
>
> ("LAMBDA NIL")
> Source: #'(LAMBDA () ((LAMBDA # # # # ...) 17))
> 6] step
>
>
> *Step*
>
> ("LAMBDA NIL")
> Source: (PRINC A)
> 6] step
>
>
> *Step*
>
> ("LAMBDA NIL")
> Source: (INCF A)
> 6] step
>
>
> *Step*
>
> ("LAMBDA NIL")
> Source: (PRINC A)
> 6] step
> 1718
> 18
>
> (It is, indeed, the very same STEP as in the debugger, by the way.)

ok. it works on your example. but if i defun your anonymous function, the 
result is not as nice :

* (defun f2 (a) (princ a) (incf a) (princ a) a)
F2
* (step (f2 17))
; Compiling LAMBDA NIL: 
; Compiling Top-Level Form: 


Stepping the form
  (F2 17)
using the debugger.  Type HELP for help.


*Step*

("LAMBDA NIL")
Source: #'(LAMBDA () (F2 17))
6] step
1718
18
* 

the compilation is "too" good ;-)

perhaps keeping source for interpreted evaluation could be a solution ...

ctu.



Reply via email to