<div>Dear Marc,</div><div><br></div><div>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.</div><div><br></div><div><div>Kind regards,</div><div>

Mikael</div></div><div><br></div><div><div><span class="Apple-style-span" style="font-weight: normal; ">> (define (gen-closure . a) (lambda</span><b> id: type-x</b> () a))</div><div style="font-weight: normal; ">> (define a (gen-closure))</div>

<div style="font-weight: normal; ">> (define b (gen-closure))</div><div style="font-weight: normal; ">> a</div><div style="font-weight: bold; "><span class="Apple-style-span" style="font-weight: normal; ">#<procedure #6</span><b><div style="display: inline !important; ">

<b><div style="display: inline !important; "> </div></b></div></b><b style="font-weight: normal; "><span class="Apple-style-span" style="font-weight: normal; "><div style="display: inline !important; ">~#a</div></span></b> <b><div style="display: inline !important; ">

<b><div style="display: inline !important; ">type-x</div></b></div></b><b style="font-weight: normal; "><span class="Apple-style-span" style="font-weight: normal; "><div style="display: inline !important; ">></div></span></b></div>

<div style="font-weight: normal; ">> b</div><div><span class="Apple-style-span" style="font-weight: normal; ">#<procedure #7</span><b style="font-weight: normal; "><span class="Apple-style-span" style="font-weight: normal; "><div style="display: inline !important; ">

 ~#b</div></span></b><b> <div style="display: inline !important; "><div style="display: inline !important; ">type-x</div></div></b><b style="font-weight: normal; "><span class="Apple-style-span" style="font-weight: normal; "><div style="display: inline !important; ">

></div></span></b></div><div style="font-weight: normal; "><b>> (closure-id a)</b></div><div><b><div>type-x</div></b></div><div><b>> (closure-id b)</b></div><div><div style="font-weight: bold; ">type-x</div><div>

<br></div><div>..and/or..</div><div style="font-weight: bold; "><span class="Apple-style-span" style="font-weight: normal; "><b><div><b><div><br></div><div>> (closure-parent-procedure a)</div><div><b><div>#<procedure #8 ~#gen-closure></div>

<div><br></div></b></div></b></div></b></span></div><div style="font-weight: bold; "><div style="font-weight: normal; ">..or..</div><div><br></div></div></div></div><div>> (define (gen-closure . a) (lambda () a))</div>

<div>> (define a (gen-closure))</div><div>> (define b (gen-closure))</div><div>> a</div><div>#<procedure #6 ~#a></div><div>> b</div><div>#<procedure #7 ~#b></div><div><b>> (get-procedure-subprocedures gen-closure)</b></div>

<div><b>'(1)</b></div><div><b>> (closure-id a)</b></div><div><b>1</b></div><div><b>> (closure-id b)</b></div><div><b>1</b></div>