I'm studying 'trace in @lib.l, and I've run into a question.
I don't understand why must 'eval be called on the second number on the
case that the first number is negative. I'm especially confused by giving 1
as an argument to 'eval. That's supposed to give you the context from which
to extract the value of @, but since its a number, it should never have an
@ to affect the result. If it was an expression, then I could understand,
but I've tried passing an expression as a second argument several times and
its always failed.

My question would be, why eval the second argument, and why pass a 1 to
eval when @ does not seem to be relevant in this context?

Here's the body of the 'trace function, as a refresher.

(de task (Key . Prg)
   (nond
      (Prg (del (assoc Key *Run) '*Run))
      ((num? Key) (quit "Bad Key" Key))
      ((assoc Key *Run)
         (push '*Run
            (conc
               (make
                  (when (lt0 (link Key))
                     (link (+ (eval (++ Prg) 1))) ) ) #the line that
confuses me
               (ifn (sym? (car Prg))
                  Prg
                  (cons
                     (cons 'job
                        (cons
                           (lit
                              (make
                                 (while (atom (car Prg))
                                    (link
                                       (cons (++ Prg) (eval (++ Prg) 1)) )
) ) ) # the same pattern in another line.
                           Prg ) ) ) ) ) ) )
      (NIL (quit "Key conflict" Key)) ) )

Reply via email to