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

Re: specification by implications and example

This page is part of the web mail archives of SRFI 17 from before July 7th, 2015. The new archives for SRFI 17 contain all messages, not just those from before July 7th, 2015.



Shriram Krishnamurthi <shriram@xxxxxxxxxxx> writes:

> as a procedure application.  Can I therefore write
> 
>   (set! ((lambda (x) x) y) V)
> 
> using your SRFI?  Your follow-up message suggests not, but nothing in
> the SRFI precludes this.  Furthermore, precluding this seems to be
> inconsistent with your desire to be "in the ``spirit of Scheme''".

It is valid syntactically.  It expands to:
        ((setter (lambda (x) x)) y V)
But since (lambda (x) x) does not have a setter associated
with it, you'd get a (run-time) error.

But this is allowed:

        (set! ((if (random) car cdr) x) v)
-- 
	--Per Bothner
per@xxxxxxxxxxx   http://www.bothner.com/~per/