Returning evaluated value Takashi Kato (04 Jan 2017 10:34 UTC)
Re: Returning evaluated value Marc Nieper-Wißkirchen (04 Jan 2017 11:04 UTC)

Re: Returning evaluated value Marc Nieper-Wißkirchen 04 Jan 2017 11:04 UTC

Am 04.01.2017 um 11:34 schrieb Takashi Kato:
> Hi,
>
> Current SRFI says assume returns unspecified value however it might be
> convenient if it
> returns the evaluated value unless the value is #f so that users can
> write code like this:
>
> (call/error (assume (assq 'a alist)))
That looks reasonable to me.

>
> BTW, what's the reason making this syntax/macro different name from
> R6RS's assert?
> c.f: http://www.r6rs.org/final/html/r6rs/r6rs-Z-H-14.html#node_idx_750
> The purpose looks exactly the same (just returning different value, though)
Is it the same? (assert #f) from R6RS raises an exception (which can be
intercepted by the program). On the other hand, (assume #f) from this
SRFI does not make any guarantees on whether an error is signaled, or
whether it just "is an error".

Marc