guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Move let/ec to top-level


From: Andy Wingo
Subject: Re: [PATCH] Move let/ec to top-level
Date: Tue, 22 Jan 2013 12:43:51 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Hi Nala,

This form is missing documentation and a test case.  I would also add it
to (ice-9 control) instead of to the core, along with the corresponding
call/ec and perhaps the longer names as well.

On Mon 14 Jan 2013 16:20, Nala Ginrut <address@hidden> writes:

> +(define-syntax-rule (let/ec k e e* ...)
> +  (let ((tag (make-prompt-tag)))
> +    (call-with-prompt
> +     tag
> +     (lambda ()
> +       (let ((k (lambda args (apply abort-to-prompt tag args))))
> +         e e* ...))
> +     (lambda (_ res) res))))
> +

Here the handler should be:

  (lambda (_ . results) (apply values results))

I would also look for let/ec in the rest of Guile and change them to
use the core definition (in peval for example I know there is one).

Andy
-- 
http://wingolog.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]