[parenscript-devel] Implicit return for function bodies

sblist at me.com sblist at me.com
Mon Nov 23 22:39:50 UTC 2009


On 2009-11-05, at 12:20 PM, sblist at me.com wrote:

> Hi Vladimir,
> 
> Another tricky area for implicit return is in IF/WHEN/UNLESS. What
> happens currently is that when a conditional is in an expression
> place (such as after a RETURN statement), it is converted into
> a ternary expression.

This is still the case as of the latest commit, so
code like this fails:

(ps (lambda ()
      (cond ((foo? x) (loop for y in x do (foo y)))
            ((bar? x) x)
            (t t))))

..and this as well:

(ps (lambda ()
      (cond ((foo? x)
             (try x (:catch (e) e)))
            ((bar? x) x)
            (t t))))

- Scott




More information about the parenscript-devel mailing list