Le 18/02/2017 à 16:50, Amirouche a écrit :


Le 18/02/2017 à 01:13, Matt Wette a écrit :
(use-modules (system repl repl))
(use-modules (system repl debug))

(define-syntax-rule (trap-here)
   (start-repl
    #:debug (make-debug (stack->vector (make-stack #t)) 0 "trap!" #t)))

(define (foo)
   (let iter ((sum 0) (vals '(1 2 3 5 8 2)))
     (trap-here)
     (if (null? vals) sum
    (iter (+ sum (car vals)) (cdr vals)))))

(foo)
It looks like that. Except `iter` should be defined in the namespace of the REPL.



Maybe iter is complicated, but at least sum and vals.


Reply via email to