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

Re: is too an application



Robert Bruce Findler wrote:
> This won't explain why, but if you write something like this:
> 
>   (lambda x (send test1 . x))
> 
> you should be okay.


OK, that helps, but suppose I want to do something like this:


(define t%
  (class object%
    (public t1 t2)
    (define t1
      (lambda x
        (printf "t1 called with args: ~a~n" x)))
    
    (define t2
      (lambda x
        (printf "t2 called with args: ~a~n" x)
        (let ([y (cons 'foo x)])
          (send this t1 . y))))
    (super-instantiate ())))

(define t (instantiate t% ()))
(send t t2 'a 'b 'c 'd)

How can I rewrite t2 without using the embedded let?