Re: Scheme help...

Subject: Re: Scheme help...
From: Harald Hanche-Olsen <hanche+dsssl-l@xxxxxxxxxxxx>
Date: Tue, 24 Feb 1998 19:52:41 +0100
- Chris Maden <crism@xxxxxxx>:

| (define (%gentext-by%) ...) defines a procedure.  That procedure is
| executed when it's called, in the context of the caller, so
| (current-node) means something.
| 
| (define %gentext-by% ...) defines a... symbol?  object?  whatever.
| Not a procedure.

Actually it might, if "..." happened to evaluate to a procedure.  In
fact, (define (%gentext-by%) ...) can be considered an abbreviation of
(define %gentext-by% (lambda () ...)).  It is a property of the
special form lambda that its body is not evaluated, but rather becomes
a part of the resulting procedure, to be evaluated when that procedure
is called.

| Please excuse me if my terminology isn't correct; I'm not a CS major
| and can't locate the right parts of the Standard.

No problem.  One would usually say that (define %gentext-by% ...)
evaluates "..." and binds the result to the symbol %gentext-by%.

- Harald


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread
  • Scheme help...
    • Norman Walsh - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id MAA11150Tue, 24 Feb 1998 12:38:36 -0500 (EST)
      • Chris Maden - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id NAA11905Tue, 24 Feb 1998 13:25:56 -0500 (EST)
        • Harald Hanche-Olsen - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id NAA12831Tue, 24 Feb 1998 13:55:43 -0500 (EST) <=
      • Daniel Speck - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id NAA12415Tue, 24 Feb 1998 13:40:36 -0500 (EST)
      • Paul Prescod - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id PAA14183Tue, 24 Feb 1998 15:30:40 -0500 (EST)
        • Earl Hood - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id QAA14800Tue, 24 Feb 1998 16:06:14 -0500 (EST)
          • Kendall G. Clark - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id RAA15832Tue, 24 Feb 1998 17:23:58 -0500 (EST)