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

Re: specification by implications and example

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/