Subject: Re: Questions about DSSSL evaluation order. From: ht@xxxxxxxxxxxxxxx (Henry S. Thompson) Date: 04 Feb 1998 11:01:56 +0000 |
"Frank A. Christoph" <christo@xxxxxxxxxxxxxxxxxx> writes: > Second, a "closure" is the result of > evaluating a function. I would have said (connecting up to our other current thread :-) that a closure is the result of evaluating a lambda-form, as in the following crypto-object-creation procedure: (define makePerson (lambda (name sex age) (lambda (opr arg) (cond ((eq? opr 'age) age) ((eq? opr 'set-age) (set! age arg)) ((eq? opr 'sex) sex) ((eq? opr 'set-sex) (set! sex arg)) ((eq? opr 'name) name) ((eq? opr 'set-name) (set! name arg)))))) (define john (makePerson "john" 'm 37)) (john 'age '()) (john 'set-age 38) (john 'age '()) ht DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Questions about DSSSL evaluatio, Frank A. Christoph | Thread | RE: DSSSL side effect-freeness, Frank A. Christoph |
RE: Questions about DSSSL evaluatio, Frank A. Christoph | Date | RE: DSSSL side effect-freeness, Frank A. Christoph |
Month |