Re: Use of lambda

Subject: Re: Use of lambda
From: Dave Love <>
Date: 26 Feb 1998 18:50:10 +0000
>>>>> "Chris" == Chris Maden <crism@xxxxxxx> writes:

 Chris> (define pages
 Chris>   (lambda ()
 Chris>     (string-append "...")))

 Chris> When I call this in the stylesheet:

 Chris> (string-append "..."
 Chris> 	       pages
 Chris> 	       "...")

 Chris> the function is processed.  Is it kosher to call a no-argument
 Chris> function without any parentheses, or is Jade being forgiving?  Should
 Chris> I go the other way and make everything a procedure instead of a
 Chris> variable, and just define some of those procedures as always giving
 Chris> the same results?

This seems confused, but I'm not sure how without more context.  On
the basis of the above fragment, Jade has a bug since the second
argument of string-append is a function, not string.  Do you _really_
mean that it's evaluated as (string-append "..." (pages) "...")?  It's
not what I see:
jade:x.dsl:13:17:E: 2nd argument for primitive "string-append" of wrong type: "#<unknown object 136994064>" not a string

[(define pages (lambda () ...))
  is the same as
(define (pages) ...).]

 DSSSList info and archive:

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