> If you use transient symbols
>
>    (de foo "Prg"
>       (when (car "Prg")
>          (run (cdr "Prg")) ) )
>
> then it basically works
>
>    : (foo T (+ 1 2 3))
>    -> 6
>    : (foo NIL (+ 1 2 3))
>    -> NIL
>
> BUT if you want to use '@'
>
>    :  (and 2 (foo T (+ 1 @ 3)))
>    !? (+ 1 @ 3)
>    T -- Number expected
>    ?

This can be fixed:

(de foo "Prg"
   (let "At" (up @)
      (when (car "Prg")
         (let @ "At"
            (run (cdr "Prg"))))))

: (and 2 (foo T (+ 1 @ 3)))
-> 6

Not sure why this does not work though:

(de foo "Prg"
   (when (car "Prg")
      (let @ (up @)
         (run (cdr "Prg")))))

: (and 2 (foo T (+ 1 @ 3)))
!? (+ 1 @ 3)
T -- Number expected
? 

even though:

(de foo "Prg"
   (when (car "Prg")
      (up @)))

: (and 2 (foo T (+ 1 @ 3)))
-> 2

works as I expect.

Cheers,

Tomas
-- 
UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Reply via email to