Dear Marc,
Is there any way to get which procedure a closure comes from? If not, would it be very easy to implement? Just wanted to check.
> (define (gen-closure . a) (lambda id: type-x () a))
> (define a (gen-closure))
> (define b (gen-closure))
> a
> b
> (closure-id a)
> (closure-id b)
type-x
..and/or..
> (closure-parent-procedure a)
#<procedure #8 ~#gen-closure>
> (define (gen-closure . a) (lambda () a))
> (define a (gen-closure))
> (define b (gen-closure))
> a
#<procedure #6 ~#a>
> b
#<procedure #7 ~#b>
> (get-procedure-subprocedures gen-closure)
'(1)
> (closure-id a)
1
> (closure-id b)
1