gcl-devel
[Top][All Lists]
Advanced

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

Re: [Gcl-devel] setf


From: Camm Maguire
Subject: Re: [Gcl-devel] setf
Date: 03 Oct 2003 18:20:17 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings!  Please excuse following up to my own post, but here is
what I have working (but uncommitted) so far:


>(function (setf foo))

(LAMBDA-CLOSURE () () () (#:G1801) (SETF FOO #:G1801))

>(setq a (function (setf foo)))

(LAMBDA-CLOSURE () () () (#:G1802) (SETF FOO #:G1802))

>a

(LAMBDA-CLOSURE () () () (#:G1802) (SETF FOO #:G1802))

>(funcall a 2)

2

>a

(LAMBDA-CLOSURE () () () (#:G1802) (SETF FOO #:G1802))

>foo

2

>(setq a (function (setf (car bar))))

(LAMBDA-CLOSURE () () () (#:G1803) (SETF (CAR BAR) #:G1803))

>(setq bar '(a b c))

(A B C)

>(funcall a 4)

4

>bar

(4 B C)


>((setf foo) 1)

1

>foo

1

>(setq bar  '(1 2 3))

(1 2 3)

>((setf (cadr bar)) 1)

1

>bar

(1 1 3)

>


Is this on track???

Take care,

Camm Maguire <address@hidden> writes:

> Greetings!  Paul, my investigations into the defgeneric and methods
> issues is leading me back to the issue of the proper treatment of
> '(setf foo) in 'function, 'flet, 'fboundp, etc.  Could you please
> briefly summarize for me what is supposed to happen, or what sections
> of the spec govern this?  It should be easy to get '(setf foo)
> recognized as a function name, but I don't know how it should react
> with defsetf -- my feeling is that in the absence of any (defun (setf
> foo) ...),
> 
> (function '(setf foo)) -> (lambda (x) (setf foo x)),
> 
> and to hope that the macroexpansion if any handles the rest.  How far
> off is this?
> 
> Take care,
> -- 
> Camm Maguire                                          address@hidden
> ==========================================================================
> "The earth is but one country, and mankind its citizens."  --  Baha'u'llah
> 
> 
> _______________________________________________
> Gcl-devel mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/gcl-devel
> 
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

[Prev in Thread] Current Thread [Next in Thread]