On Wed, Oct 22, 2008 at 04:47:36PM +0100, Tomas Hlavaty wrote:
> (de foo "Prg"
>    (let "At" (up @)
>       (when (car "Prg")
>          (let @ "At"
>             (run (cdr "Prg"))))))
> 
> : (and 2 (foo T (+ 1 @ 3)))
> -> 6

Yep. In that case, you can even omit the 'up', as '@' is not modified
yet. And the 'let's are not needed (just 'setq') because '@' will be
internally restored anyway when 'foo' terminates.

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

But I think we are getting esotherical ;-)


Up until now, the simplest (and recommended, I think) version was:

   (de foo Prg
      (when (car Prg)
         (run (cdr Prg) 1) ) )

Cheers,
- Alex
-- 
UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Reply via email to