[gambit-list] how does make-default-entry-hook work?

lowly coder lowlycoder at huoyanjinjing.com
Mon Feb 23 02:33:41 EST 2009


In lib/_repl.scm:

(define-prim
(##make-default-entry-hook)
  (let ((settings (##vector #f
#f)))
    (lambda (proc args
execute)
      (if (##vector-ref settings
0)
        (##step-on)) ;; turn on
single-stepping
      (if (##vector-ref settings
1)

(##trace-generate

         (##make-call-form
proc
                           (##argument-list-remove-absent! args
'())

##max-fixnum)

execute


#f)

        (execute)))))

how does this code work at all? isn't settings #f #f, which would mean the
first if does nothing, and the first part of the second if also does
nothing?

is there some funky dynamic-wind / dynamic scope going on here?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20090222/8902a678/attachment.htm>


More information about the Gambit-list mailing list