On Wed 18 Jan 2012 00:26, Tobias Brandt writes:
>> 0. I'm sure there is another way, but my mind blanks at the moment
>
> After you got me started, I was able to simplify and generalize it a bit.
> (-> is a GOOPS generic accessor I defined elsewhere. It works with
> vectors, arrays, strings, etc
> 0. I'm sure there is another way, but my mind blanks at the moment
After you got me started, I was able to simplify and generalize it a bit.
(-> is a GOOPS generic accessor I defined elsewhere. It works with
vectors, arrays, strings, etc ...)
(define-syntax with-accessors (lambda (stx) (synt
Tobias Brandt writes:
> Hi,
>
> is it possible to define a macro that does one thing when
> it's in operator position and another when it's not?
It depends what you mean by that. If you mean operator-position/set!
position/ variable position, then that is id-syntax. If you mean
something like
(d
On Tue 17 Jan 2012 00:11, Tobias Brandt writes:
> I want to define a macro `with-vectors` that transforms this:
>
> (with-vectors (v)
> (v 0)
> (set! (v 0) 'foo)
> (some-procedure v))
We currently don't have good support in the expander for variable
transformers that take arguments.
Hi,
is it possible to define a macro that does one thing when
it's in operator position and another when it's not?
I want to define a macro `with-vectors` that transforms this:
(with-vectors (v)
(v 0)
(set! (v 0) 'foo)
(some-procedure v))
into this:
(begin
(vector-ref v 0)