[plt-scheme] Re: send-mail-message

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed Apr 22 16:41:28 EDT 2009

At Wed, 22 Apr 2009 20:09:18 +0200, Thomas Chust wrote:
> 2009-04-22 -gary- <gary.dunne1 at gmail.com>:
> > [...]
> > "Your application raised an exception with the message:
> >
> > procedure application: expected procedure, given: "test at site.com" (no
> > arguments)"
> > [...]
> 
> Hello Gary,
> 
> your code contains the subexpression ("test at site.com") which is, like
> any list, 

Clarification: it's not a list. The expression

  ("test at site.com")

is a function call, just like

 (string-append "x" "y")

In the latter case, `string-append' is in the position of the function
expression --- which is good, because `string-append' is bound to a
function.

In the former, `"test at site.com"' is the function position --- which is
bad, because a string isn't a function.


The intent was presumably

  (list "test at site.com")

to create a list that contains the string "test at site.com".


[I know that calling an application expression a "list" comes from the
 Lisp way of thinking about how code is represented. If you want to
 talk about the representation of an expression, though, I suggest
 calling it "an address inside your computer's memory", because that's
 how it's *actually* represented. :) ]



Posted on the users mailing list.