Re: Use of lambda

Subject: Re: Use of lambda
From: Daniel Speck <dspeck@xxxxxxxxxxxx>
Date: Thu, 26 Feb 1998 13:10:25 -0500
Chris Maden wrote:

> For instance:
>
> (define pages
>   (lambda ()
>     (string-append "...")))
>
> When I call this in the stylesheet:
>
> (string-append "..."
>                pages
>                "...")
>
> the function is processed.  Is it kosher to call a no-argument
> function without any parentheses, or is Jade being forgiving?

You aren't calling the function in the above (string-append "..." pages
"...") you are accessing the value of the variable pages which should be a
function of no arguments. You should be getting an error message when
(string-append ...) tries to append its string arguments to the procedure
that pages evaluates to. In order to call the function you need to wrap the
pages variable in parentheses, e.g., (pages). Perhaps you could post a
complete code fragment that demonstrates Jade's behavior when presented
with the above?

-dan

--
Daniel Speck                              e-mail: dspeck@xxxxxxxxxxxx
Research Engineer                          voice:     +1 301.548.7818
Thomson Technology Services Group            fax:     +1 301.527.4094
1375 Piccard Drive, Rockville, MD 20850      WWW:    www.thomtech.com

begin:          vcard
fn:             Daniel Speck
n:              Speck;Daniel
org:            Thomson Technology Services Group
adr:            1375 Piccard Drive;;Suite 250;Rockville;MD;20850;USA
email;internet: dspeck@xxxxxxxxxxxx
title:          Research Engineer
tel;work:       (301) 548-7818
tel;fax:        (301) 527-4094
x-mozilla-cpt:  ;0
x-mozilla-html: TRUE
version:        2.1
end:            vcard

Current Thread
  • Use of lambda
    • Chris Maden - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id LAA28437Thu, 26 Feb 1998 11:52:50 -0500 (EST)
      • Daniel Speck - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id NAA00390Thu, 26 Feb 1998 13:13:50 -0500 (EST) <=
        • Chris Maden - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id OAA01627Thu, 26 Feb 1998 14:05:15 -0500 (EST)
      • Dave Love - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id NAA01122Thu, 26 Feb 1998 13:51:12 -0500 (EST)